Learn R Programming

RSDA (version 2.0.8)

cov: Generic function for the covariance

Description

This function compute the symbolic covariance.

Usage

cov(x, ...)

# S3 method for default cov(x, y = NULL, use = "everything", method = c("pearson", "kendall", "spearman"), ...)

# S3 method for sym.data.table cov(x, y, method = c("centers", "interval", "billard", "modal"), na.rm = FALSE, ...)

Arguments

x

First symbolic variables.

...

As in R cov function.

y

Second symbolic variables.

use

an optional character string giving a method for computing covariances in the presence of missing values. This must be (an abbreviation of) one of the strings 'everything', 'all.obs', 'complete.obs', 'na.or.complete', or 'pairwise.complete.obs'.

method

The method to be use.

na.rm

As in R cov function.

Value

Return a real number.

References

Billard L. and Diday E. (2006). Symbolic data analysis: Conceptual statistics and data mining. Wiley, Chichester.

Rodriguez, O. (2000). Classification et Modeles Lineaires en Analyse des Donnees Symboliques. Ph.D. Thesis, Paris IX-Dauphine University.

Examples

Run this code
# NOT RUN {
data(example3)
sym.data <- example3
cov(sym.data[,1], sym.data[,4], method='centers')
cov(sym.data[,2],sym.data[,6], method='centers')
cov(sym.data[,2],sym.data[,6], method='billard')

# }

Run the code above in your browser using DataLab