Skip to content
Prev 132445 / 398506 Next

plot cummulative sum from calendar time

On Wed, 2007-12-19 at 14:59 +0800, gallon li wrote:
Is this what you want?

## some example data
dat <- cumsum(rnorm(100))
start.end <- as.Date(c("01/01/2007", "31/12/2007"), format = "%d/%m/%Y")
dates <- seq(start.end[1], start.end[2], length = 100)

## plot the data
plot(dat ~ dates, type = "l")

HTH

G