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'. > > 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. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ 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.