Mean of a column

Share:

Description

Obtain the mean of a column of a parsed H2O data object.

Usage

1
2
3
4
h2o.mean(x, ..., na.rm = TRUE)

## S3 method for class 'H2OFrame'
mean(x, ..., na.rm = TRUE)

Arguments

x

An H2OFrame object.

...

Further arguments to be passed from or to other methods.

na.rm

A logical value indicating whether NA or missing values should be stripped before the computation.

Value

Returns a list containing the mean for each column (NaN for non-numeric columns).

See Also

mean for the base R implementation.

Examples

1
2
3
4
h2o.init()
prosPath <- system.file("extdata", "prostate.csv", package="h2o")
prostate.hex <- h2o.uploadFile(path = prosPath)
mean(prostate.hex$AGE)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.