Re: [R] A Date related problem

2009-12-15 Thread Marc Schwartz
On Dec 15, 2009, at 2:19 PM, Marc Schwartz wrote: On Dec 15, 2009, at 1:39 PM, Megh wrote: Dear all, Please consider following date "as.Date("2009-02-01")". If I subtract "1" then it will give last day, similarly if I subtract "2" it will give 2nd last day. But what about if I want to g

Re: [R] A Date related problem

2009-12-15 Thread Marc Schwartz
On Dec 15, 2009, at 1:39 PM, Megh wrote: Dear all, Please consider following date "as.Date("2009-02-01")". If I subtract "1" then it will give last day, similarly if I subtract "2" it will give 2nd last day. But what about if I want to get "last month", "2md last month" i.e. "2009-01-01

[R] A Date related problem

2009-12-15 Thread Megh
Dear all, Please consider following date "as.Date("2009-02-01")". If I subtract "1" then it will give last day, similarly if I subtract "2" it will give 2nd last day. But what about if I want to get "last month", "2md last month" i.e. "2009-01-01" or "2008-12-01" etc or even year? Is there any a