[R] help regarding the package installation

Duncan Murdoch murdoch.duncan at gmail.com
Fri Oct 1 17:34:32 CEST 2010


  On 01/10/2010 7:39 AM, Neeti wrote:
> hii everyone!
>
> Recently i have started working with R and it would be nice if anyone can
> help me with this.
> I am vista user (32 bit). I wanted to install package in my parent directory
> i.e .Library. whenever I try to install nnet (package) it is showing me the
> following error:
>
> >  install.packages("C:\\Users\\nn223\\Downloads\\nnet_7.3-1.zip",lib=.Library)
> Warning in install.packages("C:\\Users\\nn223\\Downloads\\nnet_7.3-1.zip",
> :
>    'lib = "C:/PROGRA~1/R/R-211~1.1/library"' is not writable

That means just what it says:  you're trying to install the package into 
a directory, but the administrator of your machine (you?) hasn't given R 
permission to make changes to that directory.  If you are the 
administrator, you might get that to work using "Run as administrator", 
which is an option in Windows when you right click on the R icon.

If you're not the administrator, chances are you'll need to find 
someplace else (where you have write permission) to install that package.


> Error in install.packages("C:\\Users\\nn223\\Downloads\\nnet_7.3-1.zip",  :
>    unable to install packages
>
> or
>
> >  install.packages(nnet,lib=.Library)
> Error in install.packages(nnet, lib = .Library) : object 'nnet' not found

That's because you don't have any object named nnet.  Some functions 
(e.g. library()) guess that you mean "nnet" when you type nnet, but 
install.packages doesn't.  So you should try

  install.packages("nnet")


Duncan Murdoch
> ############################################
> Please let me know if I am doing anything wrong.
>
> thank you
>



More information about the R-help mailing list