Learn R Programming

h2o (version 2.8.4.4)

mean.H2OParsedData: Arithmetic Mean of H2O Dataset

Description

mean.H2OParsedData, a method for the mean generic. Calculate the mean of each numeric column in a H2O dataset.

Usage

## S3 method for class 'H2OParsedData':
mean(x, trim = 0, na.rm = FALSE, ...)

Arguments

x
An H2OParsedData object.
trim
(The fraction (0 to 0.5) of observations to trim from each end of x before the mean is computed. (Currently unimplemented).
na.rm
Logical value indicating whether NA or missing values should be stripped before the computation.
...
Potential further arguments. (Currently unimplemented).

Value

  • An H2OParsedData object of scalar numeric value representing the arithmetic mean of each numeric column of x. If x is not logical or numeric, then NA_real_ is returned, with a warning.

Examples

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

Run the code above in your browser using DataLab