h2o.cor: Correlation of columns.

Description Usage Arguments Examples

View source: R/frame.R

Description

Compute the correlation matrix of one or two H2OFrames.

Usage

1
2
3
h2o.cor(x, y = NULL, na.rm = FALSE, use, method = "Pearson")

cor(x, ...)

Arguments

x

An H2OFrame object.

y

NULL (default) or an H2OFrame. The default is equivalent to y = x.

na.rm

logical. Should missing values be removed?

use

An optional character string indicating how to handle missing values. This must be one of the following: "everything" - outputs NaNs whenever one of its contributing observations is missing "all.obs" - presence of missing observations will throw an error "complete.obs" - discards missing values along with all observations in their rows so that only complete observations are used

method

str Method of correlation computation. Allowed values are: "Pearson" - Pearson's correlation coefficient "Spearman" - Spearman's correlation coefficient (Spearman's Rho) Defaults to "Pearson"

...

Further arguments to be passed down from other methods.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
library(h2o)
h2o.init()

prostate_path <- system.file("extdata", "prostate.csv", package = "h2o")
prostate <- h2o.uploadFile(path = prostate_path)
cor(prostate$AGE)

## End(Not run)

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