[R] Installing packages from folder on the computer

From: Subramanian S <subbu_at_sssu.edu.in>
Date: Tue, 22 Jun 2010 23:00:43 +0530

i am able to install zip files of packages from local zip files using the file.choose() for the package argument in install.packages() function in R console and also from the Packages menu>install from local zip files. But if there are many packages to install (say >15 or 20), then i have to factor in dependencies of 15-20 packages which may be more than 100 or 200 packages in all to be installed. i'd have to go and choose so many of them.

so, i want a command line solution.

here is what i tried:

following the CRAN Miror's hierarchy of the directory where package zip files are, i have put zip files of packages in: C:\R\packages\bin\windows\contrib\2.11

To set this folder as my Mirror to install packages from, in Rprofile.site i replaced "http://my.local.cran" with "file://C:/R/packages/" (full code given below) and then in R console i enter:

install.packages(c("pkg1", "pkg2", ...),dependencies=TRUE)

but dint succeed.

Error 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

# code in Rprofile.site to set a CRAN mirror  local({r <- getOption("repos")

      r["CRAN"] <- "http://my.local.cran/"

have changed this to:

 local({r <- getOption("repos")

      r["CRAN"] <- "file://C:/R/packages/"

Pls help.

        [[alternative HTML version deleted]]

R-help_at_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. Received on Tue 22 Jun 2010 - 17:32:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 22 Jun 2010 - 18:40:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive