5

I get

package ‘rJava’ is not available (for R version 2.15.0) 
Warning: unable to access index for repository http://cran.stat.ucla.edu/bin/macosx/leopard/contrib/2.15

when using install.packages() if the repository does not have a version of the given package for my version of R, 2.15.0--the latest Mac binary. Is there a way to get R to check in for older versions, e.g. rJava for R 2.14?

I know that I could download the tar.gz file and then use R CMD INSTALL in terminal, but I was wondering if there was a way to do this using install.packages(). Thank you.

artdv
  • 774
  • 1
  • 8
  • 23

2 Answers2

1

Try a different CRAN mirror repository (e.g. install.packages("rJava", repos = "http://cran.us.r-project.org/"), or simply try installing again with the UCLA repository. The CRAN mirror monitor report suggests there has been some sporadic downtime at the UCLA mirror recently. An Rjava binary for R 2.15.0 should be available. I can access it directly on the UCLA mirror at http://cran.stat.ucla.edu/bin/macosx/leopard/contrib/2.15/rJava_0.9-3.tgz .

jthetzel
  • 3,603
  • 3
  • 25
  • 38
  • Thanks for directing me to the histograms, I'd never seen these before. Given UCLA's mirror age stats, it's time to reconsider the importance I give to proximity. As for the link to rJava_0.9-3.tga, why is it that R still spits out ``Warning: unable to access index for repository ...`` – artdv Jun 24 '12 at 17:38
  • @user1477438: Does `install.packages("rJava", repos = "http://cran.us.r-project.org/")` yield same warning message? – jthetzel Jun 24 '12 at 18:06
  • 1
    cran.us.r-project and UC Berkeley both worked. This appears to be an isolated incident with UCLA's repository. The original question was whether there was a way to select from older versions, e.g. ``ucla.edu/.../2.14/rJava...`` but it seems that there should be no reason that one would want to, if the repository is working correctly. Thank you all very much. I'm a new active user (old passive user), kudos to the community. Now that my question has been answer, am I expected to close the question or perform some similar act? – artdv Jun 24 '12 at 19:21
  • @user1477438, if one of the answers solved your problem, you can mark it as the accepted answer. However, you are under no obligation to do so. – BenBarnes Jun 24 '12 at 20:49
0

You could install the old version of R, which has the compatible version of the package. If rJava is only available for 2.14, I'd just run that version.

Paul Hiemstra
  • 59,984
  • 12
  • 142
  • 149