Re: [R] Date functions

2009-01-30 Thread Gabor Grothendieck
# 1 d <- Sys.Date() seq(d, len = 2, by = "2 months")[2] # 2 as.numeric(format(d, "%w")) # 0 = Sunday # or format(d, "%a") See R News 4/1 for more info and the table at the end of it in particular. On Fri, Jan 30, 2009 at 9:54 AM, ehxpieterse wrote: > > Hi there, > > I am completely new to R and

[R] Date functions

2009-01-30 Thread ehxpieterse
Hi there, I am completely new to R and would like to do two things with date functions: 1. Compute any date from a specified starting point, e.g. x - 2 months 2. How do I determine the weekday of any given date? Thanks in advance -- View this message in context: http://www.nabble.com/Date-func