Many thanks! > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Prof > Brian Ripley > Sent: 25 April 2007 16:03 > To: Crispin Miller > Cc: R-help@stat.math.ethz.ch > Subject: Re: [R] R CMD CHECK and require() / library() methods > > On Wed, 25 Apr 2007, Crispin Miller wrote: > > > Hi, > > > > I have a piece of code that decides at runtime whether to > load a data > > package (and which package to load). > > This is then done with a call to: > > > > library(x) > > > > (where x is a character variable containing the package name). > > > > This causes R CMD check to throw out a warning: > > 'library' or 'required' calls not declared from: > > x > > Which version of R is this? All I can find say 'require'. >
My mistake - it was a typo it says: 'require' > > > > Does anyone have any suggestions as to a fix or workaround for this? > > That call should be > > library(x, character.only=TRUE) > > and that will in R 2.5.0 stop the warning AFAIK. > It works - much appreciated... Crispin -------------------------------------------------------- This email is confidential and intended solely for the use o...{{dropped}} ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.