Reputation: 535
have been trying to install h2o for use on R and have hit multiple buffers....
I seem to be able to install the file successfully by using:
install.packages("~/Desktop/h2o_3.18.0.1.tar.gz", repos = NULL, type = "source")
Out
installing *source* package ‘h2o’ ...
R
demo
inst
preparing package for lazy loading
help
installing help indices
building package indices
testing if installed package can be loaded
DONE (h2o)
1. Then when I call h2o, I get an error (see below), ... I understand this may be because it only works with earlier versions of java. Is this correct?
2. If so .... what should I do to get R to run an alternative version of java?
(I have seen that there are people who can do this and are describing this but I wondered if there were any concise instructions?)
Error: package or namespace load failed for ‘h2o’ in get(Info[i, 1],
envir = env):
lazy-load database
'/Library/Frameworks/R.framework/Versions/3.4/Resources/library/h2o/R/h2o.rdb'
is corrupt
In addition: Warning message:
In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1
Upvotes: 0
Views: 705
Reputation: 5778
EDIT If you have Java 9 but would like to use Java 7 or 8 for H2O, you can try running Sys.setenv("JAVA_HOME", ...)
in R before running h2o.init()
, where you specify the path to Java 7 or 8 where I have left it as ...
If you have an internet connection try following the instructions on the downloads page (select Install in R tab)
Please also post what version of Java you have.
basically run all of the following lines of code:
# The following two commands remove any previously installed H2O packages for R.
if ("package:h2o" %in% search()) { detach("package:h2o", unload=TRUE) }
if ("h2o" %in% rownames(installed.packages())) { remove.packages("h2o") }
# Next, we download packages that H2O depends on.
pkgs <- c("RCurl","jsonlite")
for (pkg in pkgs) {
if (! (pkg %in% rownames(installed.packages()))) { install.packages(pkg) }
}
# Now we download, install and initialize the H2O package for R.
install.packages("h2o", type="source", repos="http://h2o-release.s3.amazonaws.com/h2o/rel-wolpert/1/R")
# Finally, let's load H2O and start up an H2O cluster
library(h2o)
h2o.init()
Upvotes: 1