Skip to content
Prev 169621 / 398513 Next

Time Series Graphics - "cannot plot more than 10 series"

Thanks. It did give me the opportunity to discover one reason why  
dput(<object>) may not be a totally general solution to the problem of  
minimizing R-help responder time. That structure depends on an object  
that is not included, namely the mbaye dataset that you constructed  
mbaye3 from. I was able to trim out the call and remove the xtabs  
class from that structure and would have been able to test my theory  
(and that Gabor already confirmed) that the problem was that the  
plot.ts required a column oriented series and that the transpose  
operation was needed.

This was my trimmed version of mbaye3 which R accepted as valid in the  
absence of "mbaye":

mbaye3 <- structure(c(0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 1, 0, 0,
0, 1, 3, 1, 0, 0, 4, 0, 0, 0, 3, 0, 0, 0, 0, 1, 6, 0, 0, 0, 2,
0, 0, 0, 0, 1, 8, 0, 0, 0, 0, 0, 0, 1, 0, 2, 13, 3, 0, 0, 2,
1, 2, 3, 0, 1, 7, 2, 0, 0, 3, 2, 5, 1, 0, 1, 13, 0, 0, 0, 1,
1, 5, 6, 3, 1, 6, 1, 0, 0, 2, 1, 1, 6, 3, 1, 20, 4, 0, 0, 4,
1, 2, 3, 4, 0, 15, 0, 0, 0, 1, 0, 2, 2, 9, 1, 9, 2, 0, 0, 0,
2, 3, 5, 6, 3, 5, 1, 0, 0, 0, 2, 6, 3, 6, 2, 16, 4, 0, 4, 4,
0, 3, 3, 5, 0, 5, 1, 1, 3, 2, 1, 3, 1, 5, 3, 8, 3, 0, 2, 0, 0,
1, 4, 1, 2, 5, 1, 1, 5, 3, 0, 2, 2, 1, 0, 5, 3, 0, 3, 0), .Dim = c(10L,
22L), .Dimnames = structure(list(name = c("Denmark", "France",
"Germany", "Greece", "Ireland", "Italy", "Netherlands", "Portugal",
"Spain", "UK"), year = c("1972", "1973", "1974", "1975", "1976",
"1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984",
"1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992",
"1993")), .Names = c("name", "year")), class = c( "table"
))