Skip to content

Commit

Permalink
Load .RData files. Fixes #81
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Apr 17, 2012
1 parent 7e55d73 commit dbbce1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS
Expand Up @@ -10,6 +10,8 @@ BUG FIXES

* `install` now quotes `libpath` so paths with embedded spaces work and build
path (Fixes #73 and #76)

* `load_data` now also loads `.RData` files (Fixes #81)

devtools 0.6
------------
Expand Down
2 changes: 1 addition & 1 deletion R/load-data.r
Expand Up @@ -20,7 +20,7 @@ load_data <- function(pkg = NULL, env = pkg_env(pkg)) {

path_data <- file.path(pkg$path, "data")
if (file.exists(path_data)) {
paths <- dir(path_data, "\\.[rR]da(ta)?$", full.names = TRUE)
paths <- dir(path_data, "\\.[rR][dD]a(ta)?$", full.names = TRUE)
paths <- changed_files(paths)
objs <- c(objs, unlist(lapply(paths, load, envir = env)))

Expand Down

0 comments on commit dbbce1c

Please sign in to comment.