Cumulated Column Statistics

Share:

Description

Functions to compute cumulative column statistics.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## S4 method for signature 'timeSeries'
colCumsums(x, na.rm = FALSE, ...)

## S4 method for signature 'timeSeries'
colCummaxs(x, na.rm = FALSE, ...)

## S4 method for signature 'timeSeries'
colCummins(x, na.rm = FALSE, ...)

## S4 method for signature 'timeSeries'
colCumprods(x, na.rm = FALSE, ...)

## S4 method for signature 'timeSeries'
colCumreturns(x, method = c("geometric", "simple"), na.rm = FALSE, ...)

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", or "timeSeries".

...

arguments to be passed.

Value

all functions return an S4 object of class timeSeries.

Examples

1
2
3
4
5
## Simulated Return Data -
   x = matrix(rnorm(24), ncol = 2)
     
## Cumulative Sums Column by Column  -
   colCumsums(x)  

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.