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

Duncan Murdoch murdoch.duncan at gmail.com
Wed Apr 18 20:51:09 CEST 2012


On 12-04-17 11:50 PM, David Bapst wrote:
> Hi all-
>
> Henrik, packageDescription informs me that I have Matrix version 1.0-6,
> which is the newest version on CRAN.

The --as-cran check in R 2.15.0 is a little bit too aggressive:  this 
was a spurious error.  If your package depends on another package, and 
that other one depends on a recommended package that you haven't 
declared as a dependency, you'll get this spurious error.

In your case your package depends on phangorn which depends on Matrix, 
so you get the error.

A simple workaround is to declare a dependence on Matrix.  This should 
be fixed soon in R-patched.

Duncan Murdoch


>
> Duncan, I installed R-patched from CRAN, reset my path variable,
> reinstalled paleotree's dependencies and reran Rcmd check with --as-cran.
> This produced a related but different error. Instead of failing when
> examples were being run, it failed earlier when during testing the
> installation. See below:
>
> The check log:
>
> * using log directory 'c:/MyPackages/paleotree.Rcheck'
> * using R version 2.15.0 Patched (2012-04-09 r58947)
> * using platform: x86_64-pc-mingw32 (64-bit)
> * using session charset: ISO8859-1
> * checking for file 'paleotree/DESCRIPTION' ... OK
> * checking extension type ... Package
> * this is package 'paleotree' version '1.3'
> * checking CRAN incoming feasibility ... OK
> * 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 whether package 'paleotree' can be installed ... ERROR
> Installation failed.
> See 'c:/MyPackages/paleotree.Rcheck/00install.out' for details.
>
> If I go to 00install.out as directed, I find:
>
> * installing *source* package 'paleotree' ...
> ** R
> ** preparing package for lazy loading
> Error in loadNamespace(i, c(lib.loc, .libPaths())) :
>    there is no package called 'Matrix'
> ERROR: lazy loading failed for package 'paleotree'
> * removing 'c:/MyPackages/paleotree.Rcheck/paleotree'
>
> So it appears to be the same general problem with it finding package
> dependencies with the --as-cran option. This does not occur when I run the
> vanilla check command; the check runs fine and it appears to run into no
> issues with running examples.
>
> Duncan, I'll send you the tar ball source file shortly. Thank you for your
> kind offer of checking the file for me.
> -Dave
>
>
> On Tue, Apr 17, 2012 at 8:28 PM, Duncan Murdoch<murdoch.duncan at gmail.com>wrote:
>
>> On 12-04-17 9:21 PM, David Winsemius wrote:
>>
>>>
>>> On Apr 17, 2012, at 9:15 PM, Henrik Bengtsson wrote:
>>>
>>>   paleotree imports phangorn which depends on Matrix, so your example
>>>> does indeed depend on Matrix.
>>>>
>>>> A possible reason is that your installed Matrix was built for a
>>>> different version of R, i.e. check packageDescription("Matrix").
>>>>
>>>
>>> I thought Matrix was included by default as of a couple of R versions
>>> ago?
>>>
>>>
>> It is.  There are some problems in 2.15.0 in checking whether package
>> dependencies are present; they only show up on some Windows systems.  If
>> you can, please try the checks on R-patched, and see if you get the same
>> problem.  If you do, and can send me the tarball, I'll try it on my system.
>>
>> Duncan Murdoch
>>
>
>
>



More information about the R-help mailing list