[R] install.packages for local zip files
Daniel Gatti
dmgatti at mindspring.com
Sun Jul 16 23:08:27 CEST 2006
O/S: Linux
R version : 2.2.1
The R server doesn't have http internet access. And the sys admins will
not install the R libraries that I requested. So I have downloaded the
packages that I want to intall and have moved them into my home
directory on the server. These are a series of *.tar.gz files. I want
to install the R libraries in my home directory, but I can't get it to
work. According to the install.packages documentation :
install.packages(pkgs, lib, repos = getOption("repos"), contriburl =
contrib.url(repos, type), method, available = NULL, destdir = NULL,
installWithVers = FALSE, dependencies = FALSE, type = getOption("pkgType"))
repos: character vector, the base URL(s) of the repositories to use,
i.e., .... Can be 'NULL' to install from local '.tar.gz' files.
contriburl: URL(s) of the contrib section of the repositories. ......
Can be 'NULL' to install from local '.tar.gz' files.
pkgs: character vector of the short names of packages/bundles whose
current versions should be downloaded from the repositories.
If 'repos = NULL', a character vector of file paths of
'.tar.gz' files. These can be source archives or binary
package/bundle archive files (as created by 'R CMD build
--binary'). ......
lib: character vector giving the library directories where to install
the packages. Recycled as needed.
So I have issued a command like this:
> install.packages(pkgs="~/Rdownloads/hgug4112a_1.12.0.tar.gz", lib =
"~/Rlib", repos=NULL, contriburl=NULL)
Warning in download.packages(pkgs, destdir = tmpd, available =
available, :
no package '~/Rdownloads/hgug4112a_1.12.0.tar.gz' at the
repositories
As far as I can tell, I've given it the full path to the zip file, the
directory in which to install the library and I've set the repository
path to 'NULL' to indicate that I'm installing from an already
downloaded zip file. But I'm missing something. Any ideas?
Thanks,
Dan
More information about the R-help
mailing list