Learn R Programming

kazaam (version 0.1-0)

cov: Covariance and Correlation

Description

Covariance and (pearson) correlation.

Usage

# S4 method for shaq
cov(x, y = NULL, use = "everything", method = "pearson")

# S4 method for shaq cor(x, y = NULL, use = "everything", method = "pearson")

Arguments

x

A shaq.

y

At this time, this must be NULL.

use

NA handling rules, as with R's cov/cor functions. At this time, only "everything" is supported.

method

The cov/cor method. Currently only "pearson" is available.

Value

A regular matrix.

Communication

The operation is completely local except for forming the crossproduct, which is an allreduce() call, quadratic on the number of columns.

Examples

Run this code

library(kazaam)
x = ranshaq(runif, 10, 3)

cov(x)
cor(x)

finalize()


Run the code above in your browser using DataLab