apply: Apply on H2O Datasets

Description Usage Arguments Value See Also Examples

View source: R/frame.R

Description

Method for apply on H2OFrame objects.

Usage

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

Arguments

X

an H2OFrame object on which apply will operate.

MARGIN

the vector on which the function will be applied over, either 1 for rows or 2 for columns.

FUN

the function to be applied.

...

optional arguments to FUN.

Value

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

See Also

apply for the base generic

Examples

1
2
3
4
5
6
7
## Not run: 
library(h2o)
h2o.init()
iris_hf <- as.h2o(iris)
summary(apply(iris_hf, 2, sum))

## End(Not run)

h2o documentation built on Oct. 10, 2021, 1:08 a.m.