h2o.ifelse

0th

Percentile

H2O Apply Conditional Statement

Applies conditional statements to numeric vectors in H2O parsed data objects when the data are numeric.

Usage
h2o.ifelse(test, yes, no)

ifelse(test, yes, no)

Arguments
test

A logical description of the condition to be met (>, <, =, etc...)

yes

The value to return if the condition is TRUE.

no

The value to return if the condition is FALSE.

Details

Both numeric and categorical values can be tested. However when returning a yes and no condition both conditions must be either both categorical or numeric.

Value

Returns a vector of new values matching the conditions stated in the ifelse call.

Aliases
  • h2o.ifelse
  • ifelse
Examples
# NOT RUN {
h2o.init()
australia_path <- system.file("extdata", "australia.csv", package = "h2o")
australia <- h2o.importFile(path = australia_path)
australia[,9] <- ifelse(australia[,3] < 279.9, 1, 0)
summary(australia)
# }
Documentation reproduced from package h2o, version 3.22.1.1, License: Apache License (== 2.0)

Community examples

Looks like there are no examples yet.