Consider a data like this:
data <-
data.frame(
variable0 = 100 + c(0, cumsum(runif(49, -20, 20))),
variable1 = 150 + c(0, cumsum(runif(49, -10, 10))),
date = seq(as.Date("2007-01-01"), by="1 month", length.out=100)
)
How to plot time series for variable0 and variable1 on the same graph with date on x-axis.
I want to use ggplot2.
Can someone please help?