Convert H2O Data to Factors
h2o.asfactor(x)
x | An H2OFrame object. |
---|
factor
for the base R implementation, as.factor()
.
# NOT RUN { library(h2o) h2o.init() f <- "https://s3.amazonaws.com/h2o-public-test-data/smalldata/junit/cars_20mpg.csv" cars <- h2o.importFile(f) h2o.asfactor(cars["cylinders"]) # }