| cov {SparkR} | R Documentation | 
Compute the sample covariance between two expressions.
Calculate the sample covariance of two numerical columns of a SparkDataFrame.
cov(x, ...) covar_samp(col1, col2) ## S4 method for signature 'characterOrColumn' cov(x, col2) ## S4 method for signature 'characterOrColumn,characterOrColumn' covar_samp(col1, col2) ## S4 method for signature 'SparkDataFrame' cov(x, colName1, colName2)
| x | a Column or a SparkDataFrame. | 
| ... | additional argument(s). If  | 
| col1 | the first Column. | 
| col2 | the second Column. | 
| colName1 | the name of the first column | 
| colName2 | the name of the second column | 
The covariance of the two columns.
cov since 1.6.0
covar_samp since 2.0.0
cov since 1.6.0
Other math_funcs: acos, asin,
atan2, atan,
bin, bround,
cbrt, ceil,
conv, corr,
cosh, cos,
covar_pop, expm1,
exp, factorial,
floor, hex,
hypot, log10,
log1p, log2,
log, pmod,
rint, round,
shiftLeft,
shiftRightUnsigned,
shiftRight, signum,
sinh, sin,
sqrt, tanh,
tan, toDegrees,
toRadians, unhex
Other stat functions: approxQuantile,
corr, crosstab,
freqItems, sampleBy
## Not run: 
##D cov(df$c, df$d)
##D cov("c", "d")
##D covar_samp(df$c, df$d)
##D covar_samp("c", "d")
## End(Not run)
## Not run: 
##D df <- read.json("/path/to/file.json")
##D cov <- cov(df, "title", "gender")
## End(Not run)