Skip to content

Commit

Permalink
Removed library(reshape2,pos="package:base") from .onLoad. Doesn't wo…
Browse files Browse the repository at this point in the history
…rk after all and R CMD check thows NOTE. Will need to be user level until reshape2 pull request to make generic is on CRAN.
  • Loading branch information
mattdowle committed Nov 12, 2014
1 parent 6db16d3 commit d93fe09
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions R/onLoad.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,15 @@
for (i in setdiff(names(opts),names(options()))) {
eval(parse(text=paste("options(",i,"=",opts[i],")",sep="")))
}
# reshape2
if (!"package:reshape2" %in% search())
try(require(reshape2, pos="package:base", quietly=TRUE, warn.conflicts=FALSE), silent=TRUE)
# reshape2
# Tried this :
# if (!"package:reshape2" %in% search()) {
# # temporary until reshape2 pull request to make generic is on CRAN ...
# try(library(reshape2, pos="package:base", quietly=TRUE, warn.conflicts=FALSE), silent=TRUE)
# }
# which works. But then when melt in data.table is loaded, _that's_ what generates the mask message.
# There's also a NOTE: Package startup functions should not change the search path.
# Therefore, removed. Users will need to make sure reshape2 isn't loaded, or loaded behind data.table on search()

# Test R behaviour ...

Expand Down

0 comments on commit d93fe09

Please sign in to comment.