timeSeries-method-stats | R Documentation |

Many base R statistical functions work on (the data part of)
`timeSeries`

objects without the need for special methods, e.g.,
`var`

, `sd`

, `cov`

, `cor`

, probability densities,
and others. This page gives some examples with such functions.

`colStats`

,
`colVars`

, and other `colXXX`

functions

```
## Load Microsoft Data Set -
data(MSFT)
X = MSFT[, 1:4]
X = 100 * returns(X)
## Compute Covariance Matrix -
cov(X[, "Open"], X[, "Close"])
cov(X)
cor(X)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.