I have a data.frame with multiple time series vectors against a date:time vector. I would like to plot all of the relevant vectors, vertically stacked on separate graphs wit
If you want to be old-fashioned you can use lattice
. Unlike @aaronwolen I assumed there was a missing time
variable in the data set, so I made one up:
dt$time <- seq(nrow(dt))
library(reshape2)
mm <- melt(subset(dt,select=c(time,DEPTH,X,Y,Z)),id.var="time")
library(lattice)
xyplot(value~time|variable,data=mm,type="l",
scales=list(y=list(relation="free")),
layout=c(1,4))