[R] extracting year from date

2010-08-29 Thread André de Boer
Hi, Sorry for this simple question but I searched the internet and can't find the answer. From a date I want the year extracted: data$start[1 [1] 2006-11-01 Thanks for the answer, Andre [[alternative HTML version deleted]] __

Re: [R] extracting year from date

2010-08-29 Thread Henrique Dallazuanna
Try this: format(data$start, %Y) On Sun, Aug 29, 2010 at 11:32 AM, André de Boer rnie...@gmail.com wrote: Hi, Sorry for this simple question but I searched the internet and can't find the answer. From a date I want the year extracted: data$start[1 [1] 2006-11-01 Thanks for the