colCum {fSeries}R Documentation

Cumulated Column Statistics

Description

Functions to compute cumulative column statistics.

Usage

## Default S3 method:
colCumsums(x, na.rm = FALSE, ...)
## S3 method for class 'timeSeries':
colCumsums(x, na.rm = FALSE, ...)
## S3 method for class 'zoo':
colCumsums(x, na.rm = FALSE, ...)

## Default S3 method:
colCummaxs(x, na.rm = FALSE, ...)
## S3 method for class 'timeSeries':
colCummaxs(x, na.rm = FALSE, ...)
## S3 method for class 'zoo':
colCummaxs(x, na.rm = FALSE, ...)

## Default S3 method:
colCumprods(x, na.rm = FALSE, ...)
## S3 method for class 'timeSeries':
colCumprods(x, na.rm = FALSE, ...)
## S3 method for class 'zoo':
colCumprods(x, na.rm = FALSE, ...)

## Default S3 method:
colCumreturns(x, method = c("geometric", "simple"), na.rm = FALSE, ...)
## S3 method for class 'timeSeries':
colCumreturns(x, method = c("geometric", "simple"), na.rm = FALSE, ...)
## S3 method for class 'zoo':
colCumreturns(x, method = c("geometric", "simple"), na.rm = FALSE, ...)

## S3 method for class 'timeSeries':
cumsum(x)

Arguments

method a character string to indicate if geometric (TRUE) or simple (FALSE) returns should be computed.
na.rm a logical. Should missing values be removed?
x a time series, may be an object of class "matrix", "timeSeries", or "zoo".
... arguments to be passed.

Value

all functions return an S4 object of class timeSeries.

Note

The method cumsum.timeSeries will be no longer supported use instead colCumsums.

The methods for the "zoo" methods are still preliminary and untested. na.rm is not yet supported in all case, please test.

Author(s)

Diethelm Wuertz for the Rmetrics R-port.

Examples

## Simulated Monthly Return Data:
   x = matrix(rnorm(24), ncol = 2)
     
## colStats -
   colCumsums(x)  

[Package fSeries version 260.73 Index]