Using the following simulated time series:
n=70
m1 = matrix(rnorm(n), ncol=7)
m2 = matrix(rnorm(n, 0,4), ncol=7)
d = data.frame(rbind(m1,m2), cl=rep(c(1,2), each=5))
(first 7 columns represent the time point, last column the class)
Is it possible to construct a faceted time series that includes the mean curve in each plot, using ggplot2?
The results should look something like this: