0

I tried installing CRAN into R using

install.packages("cran")

The code would run but in the console the following message would appear

  package ‘cran’ is not available for this version of R

How can I install cran on my version of R?

a1b2c3
  • 25
  • 5

2 Answers2

3

CRAN is a repo not package, have you tried this:

install.packages("xtable",repos = "http://cran.us.r-project.org")
Mathmen
  • 96
  • 4
1

Better still just type install.packages("xtable")

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453
Moses
  • 1,391
  • 10
  • 25
  • perhaps explain the difference from the accepted answer (i.e., this approach will use a previously selected repository or pop up a selection box asking you to pick a CRAN mirror from a list ...) ? – Ben Bolker Apr 02 '21 at 20:03