diff --git a/DESCRIPTION b/DESCRIPTION index f39632b70baeb353fd71ef479b4d63c7913ccddf..12a312837f13f01ab8b83e13a92e8516015d6686 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: multiApply Title: Apply Functions to Multiple Multidimensional Arrays or Vectors -Version: 2.1.2 +Version: 2.1.3 Authors@R: c( person("BSC-CNS", role = c("aut", "cph")), person("Nicolau", "Manubens", , "nicolau.manubens@bsc.es", role = "aut"), diff --git a/R/Apply.R b/R/Apply.R index 108811dc74a533cefbd97fe04e1447d471ac8480..bbd71ae426f9973c3ea77ea4f2a0c214a5f4d4ce 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 = environment(fun)) + fun_env <- new.env(parent = parent.frame()) for (i in seq_along(extra_info)) { assign(names(extra_info)[i], extra_info[[i]], envir = fun_env) }