Learn R Programming

h2o (version 2.8.4.4)

h2o.removeVecs: Removes columns or vectors from H2OParsedData objects instead of making a copy of the data without the specified columns.

Description

Allows users to remove columns from H2O objects. This call acts on the H2O server through the R console as well as update the associated named object in the R environment.

Usage

h2o.removeVecs(data, cols)

Arguments

data
AnH2OParsedData object.
cols
A vector containing the names or indices of the data columns chosen to be removed.

See Also

h2o.rm, cbind

Examples

Run this code
library(h2o)
localH2O = h2o.init()
prosPath = system.file("extdata", "prostate.csv", package="h2o")
prostate.hex = h2o.importFile(localH2O, path = prosPath, key = "prostate.hex")

# Remove ID and GLEASON column from prostate data
prostate.hex = h2o.removeVecs(prostate.hex, c('ID', 'GLEASON'))
summary(prostate.hex)

Run the code above in your browser using DataLab