6

Where does one get jsonlite? Apparently it is missing from CRAN?

> install.packages('jsonlite')

Gives:

Installing package into ‘C:/Users/cbusch/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/jsonlite_0.9.20.zip'
Warning in install.packages :
  cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/jsonlite_0.9.20.zip': HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/jsonlite_0.9.20.zip'
Warning in install.packages :
  download of package ‘jsonlite’ failed

Any suggestions?

Russ Thomas
  • 792
  • 4
  • 11
  • 22
Chris
  • 1,094
  • 2
  • 10
  • 18
  • 4
    try this ....`install.packages('jsonlite', dependencies=TRUE, repos='http://cran.rstudio.com/')` – user5249203 Jun 08 '16 at 16:08
  • 1
    I found this was the case for failure when trying to use RMarkdown in RStudio ("upgrade `rmarkdown`") for the first time. Installing `jsonlite` manually resolved these issues. – Jan Benes Sep 11 '16 at 11:37

1 Answers1

8

Like @user5249203 said:

install.packages('jsonlite', dependencies=TRUE, repos='http://cran.rstudio.com/')

Community
  • 1
  • 1
Jim G.
  • 14,056
  • 19
  • 94
  • 153
  • Why does this work? How is this different from `install.pacakges('jsonlite')`? – avh4 Jan 20 '18 at 20:50
  • @avh Possibly because repos uses `http` instead of `https`. – Jim G. Jan 20 '18 at 20:59
  • 2
    Don't use this. It just forcibly installs the dependencies and will overwrite your currently installed libraries without asking, and then still throws the same compiler error. – Adam Erickson Jul 05 '18 at 23:10