[R] install.packages from local .tar.gz (was 'for local zip') files
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Jul 17 13:53:15 CEST 2006
On Mon, 17 Jul 2006, Muhammad Subianto wrote:
> On 7/16/06, Daniel Gatti <dmgatti at mindspring.com> wrote:
> > O/S: Linux
> > R version : 2.2.1
^^^^^
That appears to be the problem. As the posting guide asked you to
(***before posting***), please update.
And I presume we really are talking about .tar.gz files here, not 'zip
files' (used on Windows, which did work in 2.2.1).
> install.packages("~/R/packages/contrib/ash_1.0-9.tar.gz", repos=NULL)
works perfectly in current R, but not in the obselete 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
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> >
>
>
>
> Put your packages, for example, in directory "/dir/of/pkgs"
> library(tools)
> write_PACKAGES("/dir/of/pkgs")
>
> and the package will be installed to "/dir/of/R/libs"
>
> install.packages("NameOfPkgs",
> lib="/dir/of/R/libs",
> repos=NULL,
> dependencies=TRUE,
> contriburl="file:////dir/of/pkgs")
>
> Best, Muhammad Subianto
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list