From maechler at stat.math.ethz.ch  Thu Aug 16 09:03:33 2007
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Thu, 16 Aug 2007 09:03:33 +0200
Subject: [Rd] package dependencies
In-Reply-To: <m21we48i4a.fsf@fhcrc.org>
References: <Pine.LNX.4.64.0708151840410.5798@mordor.stat.ohio-state.edu>
	<m21we48i4a.fsf@fhcrc.org>
Message-ID: <18115.63173.648636.836215@stat.math.ethz.ch>

>>>>> "SF" == Seth Falcon <sfalcon at fhcrc.org>
>>>>>     on Wed, 15 Aug 2007 16:59:01 -0700 writes:

   SF> Zhenhuan Cui <zhenhuan at stat.osu.edu> writes:

     >> I created an add-on R package. In this package, there is
     >> a line "require(pckgname)", because I need to call some
     >> functions in pckgname. My package is successfully built
     >> and can be successful installed. But R CMD check can not
     >> be executed. The error message is:

     .............

   SF> Instead of require(pkgname), simply list pkgname in the
   SF> Depends field of your package's DESCRIPTION file.  See
   SF> the Writing R Extensions manual for details.

But he still must make sure that "R CMD check" has  'pkgname'
in its R_LIBS :

   >> Actually, before running R CMD check, I run the command "set 
   >> R_LIBS=/home/myname/MyRLibrary". It is the directory where pckgname is 
   >> installed.

   >> What else should I do so that I can pass R CMD check?

Instead of 'set R_LIBS=....'  {which seems to indicate you use a csh-alike}
use
	setenv R_LIBS=.............
	R CMD check ....

or --- typically better, since the R_LIBS setting remains "local" ---

       env R_LIBS=...........  R CMD check <mypkg

       (all in one line)
Martin



[Rd] package dependencies
Martin Maechler