tags:

views:

270

answers:

2

Hey Fellow Rstaters,

I'm working on a script that creates a package in the current directory (using pdInfoBuilder from BioConductor), and I'd like to install it while the script is running. install.packages() with repo=NULL seems like an obvious choice, but this seems to only except package directories tarballed and gzipped. Is there a way I can override this, since the create.pkg() function doesn't create a *.tar.gz? Currently I am using:

R CMD INSTALL package.name

Thanks, Vince

+5  A: 

If it's a source file, then use install.packages() and set the repos=NULL:

install.packages(file_name_and_path, repos = NULL, type="source")

See this related question: http://stackoverflow.com/questions/1474081/how-do-i-install-an-r-package-from-source

Shane
Worked perfectly - thanks Shane. I missed this in the documentation somehow.
Vince
A: 

If it isn't a .tgz, is it in full directory form? All you have to do is R CMD INSTALL dirname and it'll work. The install.packages() function's only real advantage over a raw R CMD INSTALL is that it will do all the downloading, dependency matching, etc for you.

geoffjentry