covariance: Covariance on a Spark DataFrame

Description Usage Arguments Details Value Note See Also Examples

View source: R/stats.R

Description

Covariance on a Spark DataFrame

Usage

1
covariance(x, colName1, colName2)

Arguments

x

a spark_tbl

colName1

the name of the first column

colName2

the name of the second column

Details

cov: When applied to spark_tbl, this calculates the sample covariance of two numerical columns of one spark_tbl.

Value

The covariance of the two columns.

Note

cov since 1.6.0

See Also

Other stat functions: approxQuantile(), corr(), crosstab(), freqItems(), sampleBy()

Examples

1
2
3
4
## Not run: 
cov(df, "mpg", "hp")
cov(df, df$mpg, df$hp)
## End(Not run)

danzafar/tidyspark documentation built on Sept. 30, 2020, 12:19 p.m.