> -----Original Message----- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of David Winsemius > Sent: Monday, June 20, 2011 2:07 PM > To: Deepfish > Cc: r-help@r-project.org > Subject: Re: [R] General Plotting Commands Help > > ... much elided ... > > Most of the time when getting that message, newbies (and > oldies) have > forgotten to type: > > require(scatterplot3d) # NOT scatterplot3D
This is off the topic, but when you use require(packageName) you only get a warning and an invisibly returned value of FALSE if the package is not installed so shouldn't it be called wouldLikeToLoadPackage(packageName)? library(packageName) has the advantage that it throws an error if packageName is not installed. My real question is whether there is a standard function to load a package, installing it if it is not already installed? This might be useful in a cloud computing environment, where you might install just R on a new machine in the cloud and have it install packages as needed instead of you having to know which packages need to be installed before running your job. You would just have to make sure options("repos") was set so that the install.packages() calls would work. ______________________________________________ R-help@r-project.org 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.