[R] Error with R CMD check - Packages required but not available:

Reena Bansal Reena.Bansal at moorecap.com
Wed Feb 3 16:59:50 CET 2010


I tried to bypass R CMD check myPackage2 and did the following

R CMD build myPackage2 
R CMD INSTALL -l ~/Rlibs myPackage2 

and this works, I can load myPackage2 into my R session. Wondering why R
CMD check failed and is it not necessary for R CMD check to work before
I can build the package?

-----Original Message-----
From: David Scott [mailto:d.scott at auckland.ac.nz] 
Sent: Tuesday, February 02, 2010 07:27 PM
To: Reena Bansal
Subject: Re: [R] Error with R CMD check - Packages required but not
available:

Reena Bansal wrote:
> Hi All,
> 
> Apologies in advance if this is not the right email to post this 
> question.
> 
> I successfully created my first R package myPackage1.
> Now I want to create another R package myPackage2 which requires 
> functions from myPackage1.
> 
> However when I try R CMD check myPackage2 I get the following error
> 
> * checking for working pdflatex ... OK
> * using log directory '.../myPackage/myPackage2.Rcheck'
> * using R version 2.9.2 (2009-08-24)
> * using session charset: UTF-8
> * checking for file 'myPackage2/DESCRIPTION' ... OK
> * checking extension type ... Package
> * this is package 'myPackage2' version '1.0'
> * checking package dependencies ... ERROR Packages required but not 
> available:
>   myPackage1
> 
> See the information on DESCRIPTION files in the chapter 'Creating R 
> packages' of the 'Writing R Extensions' manual.
> 
> My DESCRIPTION file looks like this
> 
> Package: myPackage2
> Type: Package
> Title: myPackage2
> Version: 1.0
> Date: 2010-02-02
> Author: RB
> Maintainer: <rb at xyz.com>
> Description: myPackage2
> Depends: myPackage1
> License: What license is it under?
> LazyLoad: yes
> 
> 
> I have also checked .libPaths() and it has the right path to find
> myPackage1 in my local R library. Any suggestions?
> 

Have you *installed* myPackage1 before trying to check myPackage2?

This sort of structure certainly works for me (VarianceGamma and
SkewHyperbolic depend on HyperbolicDist).

David Scott


--
_________________________________________________________________
David Scott	Department of Statistics
		The University of Auckland, PB 92019
		Auckland 1142,    NEW ZEALAND
Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055
Email:	d.scott at auckland.ac.nz,  Fax: +64 9 373 7018

Director of Consulting, Department of Statistics



More information about the R-help mailing list