I am currently working on an R package in Windows and recently downloaded all my files from R-forge to my local (linux) computer. Strange enough, I get an error when applying the package check, indicating that "lattice" is not installed on my computer. The output of 00check.log is as follows:
==> R CMD build --no-manual pkg
* checking for file ‘pkg/DESCRIPTION’ ... OK
* preparing ‘metamisc’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* looking to see if a ‘data/datalist’ file should be added
* building ‘metamisc_0.1.5.tar.gz’
==> R CMD check --no-manual --as-cran metamisc_0.1.5.tar.gz
* using log directory ‘/home/arrakis/SpiderOak Hive/9 - PACKAGES/metamisc/metamisc.Rcheck’
* using R version 3.4.0 (2017-04-21)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using options ‘--no-manual --as-cran’
* checking for file ‘metamisc/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘metamisc’ version ‘0.1.5’
* checking CRAN incoming feasibility ... Note_to_CRAN_maintainers
Maintainer: ‘Thomas Debray <thomas.debray@gmail.com>’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘metamisc’ can be installed ... ERROR
Installation failed.
See ‘/home/arrakis/SpiderOak Hive/9 - PACKAGES/metamisc/metamisc.Rcheck/00install.out’ for details.
* DONE
Status: 1 ERROR
See
‘/home/arrakis/SpiderOak Hive/9 - PACKAGES/metamisc/metamisc.Rcheck/00check.log’
for details.
Exited with status 1.
The output of 00install.out is:
* installing *source* package ‘metamisc’ ...
** R
** data
** inst
** preparing package for lazy loading
Error: package or namespace load failed for ‘survival’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘lattice’
Error : package ‘survival’ could not be loaded
ERROR: lazy loading failed for package ‘metamisc’
* removing ‘/home/arrakis/SpiderOak Hive/9 - PACKAGES/metamisc/metamisc.Rcheck/metamisc’
However, I can load survival and lattice manually, without any problem. These packages are installed in the folder ~/R/x86_64-pc-linux-gnu-library/3.4, which is also in the library paths.
> .libPaths()
[1] "/home/arrakis/R/x86_64-pc-linux-gnu-library/3.4" "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library" "/usr/lib/R/library"
Also, on my windows computer I dont have any problem to compile and run the package, so Im quite puzzled where this issue is originating from.
Finally, some info on my installation:
R version 3.4.0 (2017-04-21) -- "You Stupid Darkness" Copyright (C) 2017 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit)
Many thanks in advance for your help!!