h2o.asnumeric: Convert H2O Data to Numerics

View source: R/frame.R

h2o.asnumericR Documentation

Convert H2O Data to Numerics

Description

If the column type is enum and you want to convert it to numeric, you should first convert it to character then convert it to numeric. Otherwise, the values may be converted to underlying factor values, not the expected mapped values.

Usage

h2o.asnumeric(x)

Arguments

x

An H2OFrame object.

See Also

numeric for the base R implementation, as.numeric().

Examples

## 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.ascharacter(cars)
h2o.asnumeric(cars)

## End(Not run)

h2o documentation built on May 29, 2024, 4:26 a.m.