Install local package from zip archive

3.6k views Asked by At

How can I install a package from a zip file in R? I'm using the tools > install packages then selecting the install from 'Package Archive File (.zip, .tar.gz)' option. However an error message occurs. I have devtools installed, so the console window looks like this:

library("devtools", lib.loc="~/R/win-library/3.2")
install.packages("C:/Users/noodl/Downloads/RPUX/rpux_0.5.1/rpud_0.5.1.zip", repos = NULL)
Installing package into ‘C:/Users/noodl/Documents/R/win-library/3.2’ (as ‘lib’ is unspecified)

Error in install.packages : type == "both" cannot be used with 'repos = NULL'

I'm using R version 3.2

1

There are 1 answers

1
r2evans On BEST ANSWER

This is a common question ... so common, in fact, I didn't immediately find a SO question that was actually answered in an answer vice a comment. The most recent I found was @DirkEddelbuettel's comment here: add type="binary" to your command.