[R] install.packages() for local source file
Liaw, Andy
andy_liaw at merck.com
Sat Jan 1 14:52:35 CET 2005
Please read ?install.packages. It's most definitely not a bug for a
function that works as documented. If you want, you might take the source
for install.packages and strip it down to do what you want, say something
called installLocalPackages.
Andy
> From: Paul Roebuck
>
> Wish to install a local source package on Un*x platform from
> within R. Same thing as I can accomplish from cmdline as
>
> $ export R_LIBS=~/R/library
> $ cd /path/to/pkg
> $ R CMD INSTALL -l $R_LIBS <pkgname>
>
>
> So, how do you go about this anyway?
> And isn't this a bug in 'install.packages'?
>
> -------
> $ R
>
> R : Copyright 2004, The R Foundation for Statistical Computing
> Version 1.9.0 (2004-04-12), ISBN 3-900051-00-3
>
> > file.pkg <- "mypkg_0.1.tar.gz"
> > path.pkg <- file.path(path.expand("~"), "cvknn", file.pkg)
> > file.exists(path.pkg)
> [1] TRUE
> > uri.pkg <- paste("file://", path.pkg, sep = "")
> > install.packages(contriburl = uri.pkg, lib = Sys.getenv("R_LIBS"))
> Error in file.info(x) : Object "tmpd" not found
> > traceback()
> 4: file.info(x)
> 3: dirTest(destdir)
> 2: download.packages(pkgs, destdir = tmpd, available = available,
> contriburl = contriburl, method = method)
> 1: install.packages(contriburl = uri.pkg, lib = Sys.getenv("R_LIBS"))
> > version
> _
> platform sparc-sun-solaris2.9
> arch sparc
> os solaris2.9
> system sparc, solaris2.9
> status
> major 1
> minor 9.0
> year 2004
> month 04
> day 12
> language R
>
>
> ----------------------------------------------------------
> SIGSIG -- signature too long (core dumped)
>
> ______________________________________________
> 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
>
>
More information about the R-help
mailing list