h2o (version 3.2.0.3)

h2o.match: Value Matching in H2O

Description

match and %in% return values similar to the base R generic functions.

Usage

h2o.match(x, table, nomatch = 0, incomparables = NULL)

## S3 method for class 'H2OFrame': match(x, table, nomatch = 0, incomparables = NULL)

## S3 method for class 'H2OFrame,character': \%in\%(x, table)

## S3 method for class 'H2OFrame,numeric': \%in\%(x, table)

Arguments

x
a categorical vector from an H2OFrame object with values to be matched.
table
an R object to match x against.
nomatch
the value to be returned in the case when no match is found.
incomparables
a vector of calues that cannot be matched. Any value in x matching a value in this vector is assigned the nomatch value.

See Also

match for base R implementation.

Examples

Run this code
h2o.init()
hex <- as.h2o(iris)
match(hex[,5], c("setosa", "versicola"))   # versipepsi

Run the code above in your browser using DataLab