0

I am trying to install several packages on the RStudio-hosted Shiny Server, but these packages run with at least R version 3.0.0. A possible solution that I found on the Internet:

download.file('http://cran.rstudio.com/src/contrib/Archive/devtools/devtools_1.1.tar.gz', destfile='devtools_1.1.tar.gz')

install.packages('devtools_1.1.tar.gz', type='source', repos=NULL)

unlink('devtools_1.1.tar.gz')

does not work and I get the following error:

Warning in install.packages : package ‘devtools_1.1.tar.gz’ is not available (for R version 2.15.3)

How could I modify this code in such a way that I am able to install the devtools package?

Thank you in advance!

tonytonov
  • 25,060
  • 16
  • 82
  • 98
User33
  • 294
  • 3
  • 10

1 Answers1

1

I'm afraid the quick solution would involve looking into the specifics of the packages you want, but as a solution to the larger problem, checkout Packrat, which can be used to bundle R packages (of whatever version) in your application before deploying.

Jeff Allen
  • 17,277
  • 8
  • 49
  • 70
  • Thank you Jeff. I will take a look at you suggestion! But can you explain to me why I cannot install a package on the RStudio Server while I can install the same package on the same version of my local RStudio? – User33 Nov 18 '13 at 08:15