Learn R Programming

h2o (version 2.8.4.4)

is.factor: Tells user if given column is categorical data or not.

Description

Tells user if given column is categorical data or not.

Usage

is.factor(x)

Arguments

x
Columns of an H2O parsed data object.

Value

  • A logical value TRUE if column contains categorical data, FALSE otherwise.

Examples

Run this code
library(h2o)
localH2O = h2o.init()
prosPath = system.file("extdata", "prostate.csv", package="h2o")
prostate.hex = h2o.importFile(localH2O, path = prosPath)
prostate.hex[,4]=as.factor(prostate.hex[,4])
is.factor(prostate.hex[,4])
is.factor(prostate.hex[,3])

Run the code above in your browser using DataLab