Skip to content

Confused about behavior of an S4 object containing a ts object

1 message · Lyman, Mark

#
I am trying 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?
= "character"), contains = "ts")
[1] "tsExtended"
Series")
Object of class "tsExtended"
Time Series:
Start = 1
End = 10
Frequency = 1
 [1]  1  2  3  4  5  6  7  8  9 10
Slot "description":
[1] "My Time Series"
Object of class "tsExtended"
Time Series:
Start = c(1, 1)
End = c(5, 2)
Frequency = 2
 [1]  1  2  3  4  5  6  7  8  9 10
Slot "description":
[1] "My Time Series"

Mark Lyman, Statistician
Engineering Systems & Integration, ATK