Hi! I'm just seeing this thread now and while thinking about using modules::import() to replicate much of R's default attached package list (which is accessible, BTW, via options()$defaultPackages), I found this oddity:
Let this be file mod.R:
modules::import("utils", attach = TRUE)
modules::import("datasets", attach = TRUE)
print(head(iris))
And in use():
Gives this:
#> Error in head(iris) : object 'iris' not found
Changing the print statement to:
print(utils::head(datasets::iris))
... works. Perhaps I'm missing something about how attach = TRUE is supposed to work?
Originally posted by @mmuurr in #13 (comment)
Hi! I'm just seeing this thread now and while thinking about using
modules::import()to replicate much of R's default attached package list (which is accessible, BTW, viaoptions()$defaultPackages), I found this oddity:Let this be file
mod.R:And in
use():Gives this:
#> Error in head(iris) : object 'iris' not foundChanging the print statement to:
... works. Perhaps I'm missing something about how
attach = TRUEis supposed to work?Originally posted by @mmuurr in #13 (comment)