You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
For (not so) strange and peculiar reason load_all() doesn't load the datasets from data/ folder if they're saved as .R scripts. I have a nice little function that loads the package and sources datasets to package namespace so everything runs smoothly:
l <- function(){
load_all("<pkgpath>/")
for (i in dir("<pkgpath>/data", pattern = "\\.R$", full.names = TRUE))
sys.source(i, envir = as.environment("package:<pkgname>"))
}
I know what you think about loops (that they're awesome), but this works pour moi...
The text was updated successfully, but these errors were encountered:
For (not so) strange and peculiar reason
load_all()
doesn't load the datasets fromdata/
folder if they're saved as.R
scripts. I have a nice little function that loads the package and sources datasets to package namespace so everything runs smoothly:I know what you think about loops (that they're awesome), but this works pour moi...
The text was updated successfully, but these errors were encountered: