Learn R Programming

timeSeries (version 3011.98)

math: Mathematical Time Series Operations

Description

Functions and methods dealing with mathematical 'timeSeries' operations.

Usage

## S3 method for class 'timeSeries':
quantile(x, \dots)

Arguments

x
an object of class timeSeries.
...
arguments to be passed.

Value

  • Returns the value from a mathematical or logical operation operating on objects of class 'timeSeries[], or the value computed by a mathematical function.

Details

The math functions include: ll{ Ops-method Group 'Ops' methods for a 'timeSeries' object Math-method Group 'Math' methods for a 'timeSeries' object Math2-method Group 'Math2' methods for a 'timeSeries' object Summary-method Group 'Summary' methods for a 'timeSeries' object quantile Returns quantiles of an univariate 'timeSeries'. }

Examples

Run this code
## Create an Artificial timeSeries Object - 
   setRmetricsOptions(myFinCenter = "GMT")
   charvec = timeCalendar()
   set.seed(4711)
   data = matrix(exp(cumsum(rnorm(12, sd = 0.1))))
   TS = timeSeries(data, charvec, units = "TS")
   TS

## Mathematical Operations: | +/- * ^ ... - 
   TS^2
   TS[2:4]
   OR = returns(TS)
   OR
   OR > 0

Run the code above in your browser using DataLab