[R] installing packages from a directory on the computer
Peter Ehlers
ehlers at ucalgary.ca
Tue Jun 22 09:19:18 CEST 2010
On 2010-06-21 23:39, Subramanian S wrote:
> i wish to know how to set a folder in computer as a mirror from which i can
> install packages
> i am aware of the menu approach- "Packages>install from local zip files" but
> i wish to know the command line approach because i dont have internet access
> on the computer where i will be using R.
Why do you need internet access to install from *local* zip files?
>
> i have put the zip files of packages in
> C:\R\packages\bin\windows\contrib\2.11
>
> i have put the following lines in Rprofile.site
>
> local({r<- getOption("repos")
> r["CRAN"]<- "file://C:/R/packages/"
> options(repos=r)})
>
> but when i run install.packages("package_name_here"), i get the following
> message:
>
> Warning in gzfile(file, "r") :
> cannot open compressed file
> '//C:/R/packages/bin/windows/contrib/2.11/PACKAGES', probable reason 'No
> such file or directory'
> Error in gzfile(file, "r") : cannot open the connection
>
>
> Please help
Just use file.choose() for the pkgs argument (and perhaps
set repos=NULL).
-Peter Ehlers
More information about the R-help
mailing list