Learn R Programming

h2o (version 2.8.4.4)

unique.H2OParsedData: Extract Unique Elements from H2O Dataset

Description

unique.H2OParsedData, a method for the unique generic. Returns a H2O dataset like x but with duplicate elements/rows removed.

Usage

## S3 method for class 'H2OParsedData':
unique(x, incomparables = FALSE, \dots)

h2o.unique(x, incomparables = FALSE, ...)

Arguments

x
An H2OParsedData object.
incomparables
A vector of values that cannot be compared, or FALSE which indicates all values can be compared. (Currently unimplemented).
...
Potential further arguments. (Currently only partially unimplemented).

Value

  • An H2OParsedData with the same columns, but all duplicate rows removed.

Details

Only MARGIN = 2 is currently supported, that is, dropping duplicate rows in a H2O dataset. This method runs on top of ddply in H2O.

Examples

Run this code
library(h2o)
localH2O = h2o.init()
prosPath = system.file("extdata", "prostate.csv", package="h2o")
prostate.hex = h2o.importFile(localH2O, path = prosPath)
nrow(prostate.hex$AGE)
prosAge.uniq = unique(prostate.hex$AGE)
nrow(prosAge.uniq)
head(prosAge.uniq)

Run the code above in your browser using DataLab