Ops.uts_virtual: Ops Group Methods

Description Usage Arguments Details Note See Also Examples

View source: R/group_methods.R

Description

Apply the Ops group methods in base R to the observation values of "uts" objects.

Usage

1
2
## S3 method for class 'uts_virtual'
Ops(e1, e2)

Arguments

e1, e2

either "uts", "uts_vector" "uts_matrix" objects, or compatible length-one R objects, where compatability depends on the type of operation performed.

Details

For unary oparations or operations involving just one time series and another R object, the output time series has the same observation times as the input time series.

For binary operations involving two time series e1 and e2, the output time series has the union of observation times of e1 and e2, but excluding times before the first observation time (i.e. the start time) of either time series. The method for determining these times is unaffected by numerical noise less than sqrt(.Machine$double.eps).

Note

The classes "uts", "uts_vector", and "uts_matrix" (see package utsMultivariate for the latter two) inherit from the abstract class "uts_virtual". Because the Ops group methods are implemented via Ops.uts_virtual, operations such as subtraction can mix the classes.

For binary Ops group methods, this function is a special case of binary_Ops. Specifically, e1+e2 gives the same result as binary_Ops(e1, "+", e2, times="all", interpolation="last"), and the same is true for the other binary "Ops" methods.

See Also

groupGeneric, binary_Ops

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Unary oparators
-ex_uts()
!ex_uts()

# Binary operators
ex_uts() * 2
2 * ex_uts()
ex_uts() / ex_uts()
ex_uts() > 48
48 >= ex_uts()

andreas50/uts documentation built on April 8, 2021, 10:03 a.m.