You need to install Java. That seems not to be in the rJava
documentation: you get it from here:
http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
and need the version for the version of R (32- or 64-bit, x86 or x64 in
Oracle parlance) you want to run.
Please do follow the R-help posting guide and not send HTML, and give
the 'at a minimum' information asked for (which includes that this is
Windows i386 or x64).
On 21/01/2014 20:49, Rainer K. SACHS wrote:> example:
>
>> getwd() # with RStudio you can read it off the console bar[1]
"C:/Users/ra`-/Documents/1ray/plans/learnR/week3liats">
library(xlsx)Loading required package: rJavaError : .onLoad failed in
loadNamespace() for 'rJava', details:
> call: fun(libname, pkgname)
> error: JAVA_HOME cannot be determined from the RegistryIn addition:
> Warning messages:1: package ?xlsx? was built under R version 3.0.2 2:
> package ?rJava? was built under R version 3.0.2 Error: package ?rJava?
> could not be loaded> install.packages("rJava")Installing
package into
> ?C:/Users/ra`-/Documents/R/win-library/3.0?
> (as ?lib? is unspecified)trying URL
>
'http://cran.rstudio.com/bin/windows/contrib/3.0/rJava_0.9-6.zip'Content
> type 'application/zip' length 758820 bytes (741 Kb)opened
> URLdownloaded 741 Kbpackage ?rJava? successfully unpacked and MD5 sums
> checked
> The downloaded binary packages are in
> C:\Users\ra`-\AppData\Local\Temp\Rtmpq0N2f2\downloaded_packages>
> library("rJava",
> lib.loc="C:/Users/ra`-/Documents/R/win-library/3.0")Error :
.onLoad
> failed in loadNamespace() for 'rJava', details:
> call: fun(libname, pkgname)
> error: JAVA_HOME cannot be determined from the RegistryIn addition:
> Warning message:package ?rJava? was built under R version 3.0.2 Error:
> package or namespace load failed for ?rJava?
>
> I tried various things with searhpath, but can't figure out if this a
> windows 7 problem, an R problem, an R-studio problem, an R4 vs R3
> problem, an rJava problem, a firewall problem, or some clever
> combination of such problems. Any tips greatly appreciated even if all
> they tell me is in which direction to look (e.g. give Windows a
> different searchpath?)
>
> TIA Ray Sachs
>
> [[alternative HTML version deleted]]
>
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595