hadley/devtools — Issue #45: Load R scripts from data/ folder with load_all()
Author: aL3xa
Created: 2012-01-16 18:27:32+00:00
State: open

For (not so) strange and peculiar reason `load_all()` doesn't load the data from `data/` folder if they're saved as `.R` scripts. I have a nice little function that loads the packages and sources datasets to package namespace so everything runs smoothly:

```
l <- function(){
load_all("/")
for (i in dir("/data", pattern = "\\.R$", full.names = TRUE))
sys.source(i, envir = as.environment("package:"))
}
```

I know what you think about loops (that they're awesome), but this works _pour moi_...