aggregate {fSeries}R Documentation

timeSeries Class, Functions and Methods

Description

Computes Summary Statistics of Data Subsets

Usage

## S3 method for class 'timeSeries':
aggregate(x, by = c("monthly", "quarterly"), 
    FUN = colMeans, units = NULL, ...)

Arguments

by [aggregate] -
a character string denoting the aggregation period, either "monthly" or "quarterly".
FUN the function to be applied.
units an optional character string, which allows to overwrite the current column names of a timeSeries object. By default NULL which means that the column names are selected automatically.
x an object of class timeSeries.
... arguments passed to other methods.

Value

returns an aggregated S4 object of class timeSeries.

Author(s)

Diethelm Wuertz for the Rmetrics R-port.

Examples

## data - 
   x = as.timeSeries(data(msft.dat))
   
## aggregate -
   aggregate(x)   

[Package fSeries version 260.73 Index]