Displaying 2 results from an estimated 2 matches for "tsextended".
Did you mean:
isextended
2009 Jan 22
0
Confused about behavior of an S4 object containing a ts object
...ponse.
I still have not been able to figure out what is happening.
I also noticed another oddity. When the data part of the object is a
multivariate time series, it doesn't show up in the structure, but it
can be treated as a multivariate time series. Is this a bug in str?
> setClass("tsExtended", representation = representation(description
+ = "character"), contains = "ts")
[1] "tsExtended"
> tmp <- new("tsExtended", matrix(1:20, ncol=2), description = "My Time
Series")
> tsp(tmp) <- c(1, 5.5, 2)
> tmp
Object of class...
2008 Dec 18
0
Confused about behavior of an S4 object containing a ts object
...g to define an S4 class that contains a ts class object, a
simple
example is shown in the code below. However, when I try to create a new
object
of this class the tsp part is ignored, see below. Am I doing something
wrong,
or is this just a peril of mixing S3 and S4 objects?
> setClass("tsExtended", representation = representation(description
= "character"), contains = "ts")
[1] "tsExtended"
> new("tsExtended", ts(1:10, frequency = 2), description = "My Time
Series")
Object of class "tsExtended"
Time Series:
Start = 1
End =...