itsArith {its}R Documentation

Arithmetic Methods for Irregular Time-Series Objects

Description

Arithmetic methods for objects of class "its".

Arguments

e1 its object
e2 its object

Details

Date matching is performed then the arithmatic is done on the intersection of the dates of the two arguments. The arithmetic operators return numeric vectors containing the result of the element-by-element operations.

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.

Value

The returned object is an object of class "its", having the same number of columns as the two arguments, however, the number of rows will be the length of the intersection of the dates of the two arguments.

Author(s)

Giles Heywood

See Also

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

Examples

b <- newIts(1:30,ncol=3)
c <- newIts(1:10,ncol=3)[1:5,]
b+c
b+b-2*b
b/b
b%*%diag(ncol(b))
its(b%*%diag(ncol(b))) 

[Package its version 1.1.1 Index]