Question on timeSeries and S4 classes: Consider the following: library(timeSeries) data <- rnorm(5) treg <- ts(data, frequency=4)
t1 <- timeSeries(data, as.Date('2010-04-15') + 1:5) t2 <- as.timeSeries(treg) Now both t1 and t2 are timeSeries objects, yet t...@ts is a valid slot, while t...@ts is not. Thus the ts slot is optional. Sorry if I am misunderstanding the way S4 classes work, but shouldn't a class have a well-defined set of slots? It appears that the "constructor" as.timeSeries() used to create t2 results in a different kind of object from the one used to define t1, yet the class() operator returns the same class name ('timeSeries') in both cases. Thanks, Dominick ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel