Closed HenrikBengtsson closed 1 year ago
The following requires that find_files_in_directories() is exported even if it part of the 'utils' namespace:
find_files_in_directories()
library(future) plan(cluster, workers = 1L) find_files_in_directories <- utils:::find_files_in_directories f <- future({ list(Sys.getpid(), f=find_files_in_directories) }) value(f)
BTW, it is exported because it lives (= "where") in environment R_GlobalEnv() not the package namespace;
R_GlobalEnv()
str(f$globals) List of 1 $ find_files_in_directories:function (basenames, dirnames) - attr(*, "where")=List of 1 ..$ find_files_in_directories:<environment: R_GlobalEnv> - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list" - attr(*, "resolved")= logi FALSE - attr(*, "total_size")= num 37344
The following requires that
find_files_in_directories()
is exported even if it part of the 'utils' namespace:BTW, it is exported because it lives (= "where") in environment
R_GlobalEnv()
not the package namespace;