its (version 1.0.3)

itsArith: Arithmetic Methods for Irregular Time-Series Objects

Description

Arithmetic methods for objects of class "its".

Usage

x + y
     x - y
     x * y
     x / y
     x ^ y
     x     x

Arguments

x,y
an object of class "its"

Value

  • The returned object is an object of class "its", conformable with the inputs, and with identical time-stamps.

Details

The arithmetic operators return numeric vectors containing the result of the element-by-element operations. The arguments must be conformable (same dimensions) and their time-stamps must match for each row. Note that the matrix multiplication operator,and the result of a matrix multiplication is a matrix, not an "its". The resulting matrix can be converted back to its using the function its() - see examples.

See Also

ts, POSIXct, itsFile, itsLags itsJoin itsTimes itsSubset itsFin itsDisp itsInfo itsCumdif itsInterp

Examples

Run this code
b <- newIts(1:30,ncol=3)
b+b-2*b
b/b
b%*%diag(ncol(b))
its(b%*%diag(ncol(b)))

Run the code above in your browser using DataLab