lever lever - 7 months ago 50
R Question

error in R h2o h2o.uploadFile

I am trying the tutorial from http://www.r-bloggers.com/diving-into-h2o/

I downloaded some of the airlines data locally. I am able to connect R to an H2O instance and run the demo, but I am not able to upload the airlines data successfully with an h2o function. I am not getting an error either. This is what happens:

localH2O = h2o.init()
DTair <- fread(pathAirline)
[1] 7009728 29
air2008.hex = h2o.uploadFile(localH2O, path = pathAirline, destination_frame = "air2008.hex", parse = FALSE)
[1] -1 -1

When I import with the fread() function, I get the data as expected. When I try to use h2o.uploadFile() I don't see any errors but the object has dimensions -1 by -1.

Any help is appreciated.


The H2OConnection object (your localH2O object) is no longer supposed to be passed in to any of the uploadFile/importFile functions (it was deprecated), so you should remove argument that from the function. Also, you should use the default, parse = TRUE, if you actually want to read the data in.

Also, it is recommended to use the h2o.importFile instead of h2o.uploadFile since it is multi-threaded.