Are R packages (and their dependencies) OS specific?
On Mac OS X, loading data.table.
did not require chron
. On Windows, it was required.
If not, how could I detect these OS specific differences prior to trying to load data.table
(or similar)?
Output on MAC:
require(data.table, lib.loc='packrat/lib/x86_64-apple-darwin10.8.0/3.1.1') sessionInfo() R version 3.1.1 (2014-07-10) Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages: [1] stats graphics grDevices utils datasets methods
[7] base
other attached packages: [1] data.table_1.9.2
loaded via a namespace (and not attached): [1] plyr_1.8.1 Rcpp_0.11.3 reshape2_1.4 stringr_0.6.2 [5] tools_3.1.
Other files in the library folder:
list.dirs('packrat/lib/x86_64-apple-darwin10.8.0/3.1.1', full.names=FALSE, recursive=FALSE)
[1] "colorspace" "data.table" "dichromat" "digest"
[5] "ggplot2" "gtable" "labeling" "manipulate"
[9] "MASS" "munsell" "packrat" "plyr"
[13] "proto" "RColorBrewer" "Rcpp" "reshape"
[17] "reshape2" "rstudio" "scales" "stringr"
[21] "yaml"
Standard R library folder:
list.dirs('/Library/Frameworks/R.framework/Resources/library', full.names=FALSE, recursive=FALSE)
[1] "base" "compiler" "datasets" "graphics" "grDevices"
[6] "grid" "lattice" "MASS" "Matrix" "methods"
[11] "nlme" "parallel" "splines" "stats" "stats4"
[16] "tcltk" "tools" "utils"
链接地址: http://www.djcxy.com/p/91598.html
上一篇: DescTools包输出到word文档
下一篇: R包(及其依赖项)操作系统是否具体?