问题
I know the as.h2o
function from h2o library converts an R data.frame to an H2O frame. Two questions:
- Does
as.h2o()
write data to disk during conversion? How long is this data stored? - Are there other options that avoids the temp step of writing to disk?
回答1:
The exact path of running as.h2o on a data.frame, df :
path <- write.csv(df)
h2o.upload(path)
remove.file(path)
We temporarily write to disk the data.frame and then subsequently upload rather than import the file into H2O and as soon as the file is uploaded we delete the temporary frame. There is no cleaner alternative to not writing to disk.
来源:https://stackoverflow.com/questions/33624415/converting-r-dataframe-to-h2o-frame-without-writing-to-disk