Lagged-class | R Documentation |
Class Lagged.
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.
data
:Object of class "ANY"
. Subclasses of
"Lagged" may restrict the class of this slot.
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)]
.
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")
: ...
signature(from = "Lagged", to = "array")
: ...
signature(from = "Lagged", to = "matrix")
: ...
signature(from = "Lagged", to = "vector")
: ...
signature(x = "Lagged")
: ...
signature(x = "Lagged")
: ...
signature(object = "Lagged")
: ...
signature(e1 = "FlexibleLagged", e2 = "Lagged")
: ...
signature(e1 = "Lagged", e2 = "FlexibleLagged")
: ...
signature(e1 = "Lagged", e2 = "Lagged")
: ...
signature(e1 = "Lagged", e2 = "missing")
: ...
signature(e1 = "Lagged", e2 = "vector")
: ...
signature(e1 = "vector", e2 = "Lagged")
: ...
signature(x = "Lagged")
: ...
Georgi N. Boshnakov
function Lagged
which creates objects from suitable
subclasses of "Lagged"
,
and also
Lagged1d
,
Lagged2d
,
Lagged3d
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.