From 2421a22bdf49a388dbc6b55b808ca5837eb2a162 Mon Sep 17 00:00:00 2001 From: nperez Date: Fri, 3 Apr 2020 11:06:29 +0200 Subject: [PATCH] parent directory the function environment --- R/Apply.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/Apply.R b/R/Apply.R index bbd71ae..108811d 100644 --- a/R/Apply.R +++ b/R/Apply.R @@ -507,7 +507,7 @@ Apply <- function(data, target_dims = NULL, fun, ..., chunk_sizes <- c(chunk_sizes, total_size %% chunk_size) } - fun_env <- new.env(parent = parent.frame()) + fun_env <- new.env(parent = environment(fun)) for (i in seq_along(extra_info)) { assign(names(extra_info)[i], extra_info[[i]], envir = fun_env) } -- GitLab