[R] transforming year.weeknumber into dates
jholtman at gmail.com
Fri Jul 15 21:26:47 CEST 2011
> x <- c('2009.12', '2009.30')
> as.Date(paste(x, '1'), format = "%Y.%W %w")
 "2009-03-23" "2009-07-27"
On Fri, Jul 15, 2011 at 1:54 PM, Dimitri Liakhovitski
<dimitri.liakhovitski at gmail.com> wrote:
> I know how to transform dates into year.weeknumber format using zoo:
> as.numeric(format(as.Date("2010-10-02"), "%Y.%W"))
> But is there a straightforward way to do the opposite - to transform
> character strings like "2009.12" or "2009.30" back into dates
> (assuming that weeks start on Monday)?
> Thanks a lot!
> Dimitri Liakhovitski
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Data Munger Guru
What is the problem that you are trying to solve?
More information about the R-help