Learn R Programming

h2o (version 2.8.4.4)

apply: Applies a function over an H2O parsed data object.

Description

Applies a function over an H2O parsed data object (an array).

Usage

apply(X, MARGIN, FUN, ...)

Arguments

X
An H2OParsedData object.
MARGIN
The margin along wich the function should be applied
FUN
The function to be applied by H2O.
...
Optional arguments to FUN. (Currently unimplemented).

Value

  • Produces a new H2OParsedData of the output of the applied function. The output is stored in H2O so that it can be used in subsequent H2O processes.

Examples

Run this code
library(h2o)
localH2O = h2o.init()
irisPath = system.file("extdata", "iris.csv", package="h2o")
iris.hex = h2o.importFile(localH2O, path = irisPath, key = "iris.hex")
summary(apply(iris.hex, 1, sum))

Run the code above in your browser using DataLab