[R] General Plotting Commands Help

William Dunlap wdunlap at tibco.com
Mon Jun 20 23:30:39 CEST 2011


> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of David Winsemius
> Sent: Monday, June 20, 2011 2:07 PM
> To: Deepfish
> Cc: r-help at 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.



More information about the R-help mailing list