Lagged-class {lagged}R Documentation

Class Lagged

Description

Class Lagged.

Objects from the Class

This class serves as a base class for objects with natural indexing starting from zero. It is a virtual class, no objects can be created from it.

Arithmetic and other operations are defined. They return objects strictly from the core "Lagged" classes, even if the arguments are from classes inheriting from the core "Lagged" classes. Of course, for such classes specialised methods can be defined to keep the class when appropriate. For example, the sum of two autocovariance functions is an autocovariance function, but their difference may not be a valid one.

In arithmetic operations between "Lagged" objects the arguments are made of equal length by filling in NA's. When one of the operands is not "Lagged", the recycling rule is applied only if that argument is a singleton.

Slots

data:

Object of class "ANY". Subclasses of "Lagged" may restrict the class of this slot.

Methods

[

signature(x = "Lagged", i = "missing", j = "ANY", drop = "ANY"): In this case (i.e., i is missing) [], returns the underlying data. This is equivalent to using x[1:maxLag(x)].

maxLag

signature(object = "Lagged"): Gives the maximal lag in the object.

[[

signature(x = "Lagged", i = "numeric"): ...

[[<-

signature(x = "Lagged", i = "numeric"): ...

[<-

signature(x = "Lagged", i = "missing"): ...

coerce

signature(from = "Lagged", to = "array"): ...

coerce

signature(from = "Lagged", to = "matrix"): ...

coerce

signature(from = "Lagged", to = "vector"): ...

Math

signature(x = "Lagged"): ...

Math2

signature(x = "Lagged"): ...

maxLag<-

signature(object = "Lagged"): ...

Ops

signature(e1 = "FlexibleLagged", e2 = "Lagged"): ...

Ops

signature(e1 = "Lagged", e2 = "FlexibleLagged"): ...

Ops

signature(e1 = "Lagged", e2 = "Lagged"): ...

Ops

signature(e1 = "Lagged", e2 = "missing"): ...

Ops

signature(e1 = "Lagged", e2 = "vector"): ...

Ops

signature(e1 = "vector", e2 = "Lagged"): ...

Summary

signature(x = "Lagged"): ...

Author(s)

Georgi N. Boshnakov

See Also

function Lagged which creates objects from suitable subclasses of "Lagged", and also Lagged1d, Lagged2d, Lagged3d

Examples

Lagged(1:12)                   # => Lagged1d
Lagged(matrix(1:12, ncol = 3)) # => Lagged2d
Lagged(array(1:24, dim = 2:4))  # => Lagged3d

## equivalently:       
new("Lagged1d", data = 1:12)                   # => Lagged1d
new("Lagged2d", data = matrix(1:12, ncol = 3)) # => Lagged2d
new("Lagged3d", data = array(1:24, dim = 2:4)) # => Lagged3d

[Package lagged version 0.3.2 Index]