Try this also:

x <- seq(as.Date("2008-01-01"), as.Date("2008-12-31"), l = 10)
as.Date(embed(matrix(x), 2)[,1], origin = "1970-01-01")

On Wed, Jan 21, 2009 at 7:18 PM, Alina Sheyman <alinashe@gmail.com> wrote:

> I am working with a list of dates and I would like to replace each date
> with
> the one that comes after, ie. 1/1/07 will become 1/5/07, 1/5/07 will become
> 1/7/07, etc. The number of days between my dates always varies, so I can't
> just increase each one by 5 days or  so. Does anyone know of a way I can do
> this in R?
>
> thank you
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

	[[alternative HTML version deleted]]


