h2o (version 3.2.0.3)

h2o.setLevel: Set a Factor Column to a Level

Description

A method to set a factor column to one of the levels.

Usage

h2o.setLevel(x, level)

Arguments

x
a column from an H2OFrame object.
level
The level at which the column will be set.

Value

  • An object of class H2OFrame.

Details

Replace all other occurences with `level` in a factor column.

Examples

Run this code
localH2O <- h2o.init()
hex <- as.h2o(localH2O  , iris)
hex$Species <- h2o.setLevel(hex$Species, "versicolor")

Run the code above in your browser using DataLab