[R] Error with Rcmd check library --as-cran

Duncan Murdoch murdoch.duncan at gmail.com
Fri Apr 20 19:05:55 CEST 2012


On 17/04/2012 7:23 PM, David Bapst wrote:
> Hello all,
>
> I was checking the newest update of my library before submitting it to
> CRAN, using R 2.15.0 and Rtools for Windows 215 using Rcmd in the Command
> Prompt, on my x64 Windows7 laptop. I recently heard that for checking
> packages for CRAN submission one should use the option --as-cran;
> previously I was submitting packages, so I was trying that for the first
> time. The check proceeds fine until it tries running the examples, at which
> point it produces the following error message:
>
> >  pkgname<- "paleotree"
> >  source(file.path(R.home("share"), "R", "examples-header.R"))
> >  options(warn = 1)
> >  options(pager = "console")
> >  library('paleotree')
> Loading required package: ape
> Error in loadNamespace(i, c(lib.loc, .libPaths())) :
>    there is no package called 'Matrix'
> Error: package/namespace load failed for 'paleotree'
> Execution halted
>
> My package depends on ape, but not Matrix. Matrix is installed, though, on
> my workstation, as are the other ape dependencies. The check works fine by
> default and with the --timings option. What is different about --as-cran
> that makes it unable to find Matrix?

This should now be fixed in R-patched and R-devel (revisions 59125 or 
larger), no need for the workaround I suggested yesterday.

Duncan Murdoch



More information about the R-help mailing list