h2o.sum: Compute the frame's sum by-column (or by-row).

View source: R/frame.R

h2o.sumR Documentation

Compute the frame's sum by-column (or by-row).

Description

Compute the frame's sum by-column (or by-row).

Usage

h2o.sum(x, na.rm = FALSE, axis = 0, return_frame = FALSE)

Arguments

x

An H2OFrame object.

na.rm

logical. indicating whether missing values should be removed.

axis

An int that indicates whether to do down a column (0) or across a row (1). For row or column sums, the return_frame parameter must be TRUE.

return_frame

A boolean that indicates whether to return an H2O frame or one single aggregated value. Default is FALSE.

See Also

sum for the base R implementation.

Examples

## Not run: 
library(h2o)
h2o.init()

frame <- h2o.createFrame(rows = 6, cols = 2,
                         categorical_fraction = 0.0, 
                         missing_fraction = 0.7, 
                         seed = 123)
h2o.sum(frame["C1"], na.rm = TRUE, axis = 0, return_frame = TRUE)

## End(Not run)

h2o documentation built on May 29, 2024, 4:26 a.m.