Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert r data frame to h2o object

Tags:

Im new to R and H2O and I have tried to find a way to convert r data frame to a h2o object. I have spent some time research on how to do this with no luck. Other way around is possible and well documented as follows.

prosPath = system.file("extdata", "prostate.csv", package="h2o")
prostate.hex = h2o.importFile(localH2O, path = prosPath)
prostate.data.frame <- as.data.frame(prostate.hex)

But what i want is complete opposite of this. I wants to convert r "prostate.data.frame" data object converted to h2o object named "prostate.hex". Thanks in advance.

like image 712
plr Avatar asked Dec 18 '14 18:12

plr


1 Answers

As per h2o version 3.6.0.8, it does not require any parameters. Example:

iris.hex <- as.h2o(iris)
like image 140
Ram Avatar answered Sep 20 '22 17:09

Ram