h2o (version 3.2.0.3)

h2o.var: Variance of a column.

Description

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

Usage

h2o.var(x, y = NULL, na.rm = FALSE, use)

## S3 method for class 'H2OFrame': var(x, y = NULL, na.rm = FALSE, use)

Arguments

x
An H2OFrame object.
y
NULL (default) or a column of an H2OFrame object. The default is equivalent to y = x (but more efficient).
na.rm
logical. Should missing values be removed?
use
An optional character string to be used in the presence of missing values. This must be one of the following strings. "everything", "all.obs", or "complete.obs".

See Also

var for the base R implementation. h2o.sd for standard deviation.

Examples

Run this code
localH2O <- h2o.init()
prosPath <- system.file("extdata", "prostate.csv", package="h2o")
prostate.hex <- h2o.uploadFile(localH2O, path = prosPath)
var(prostate.hex$AGE)

Run the code above in your browser using DataLab