Try this:


format(data$start, "%Y")

On Sun, Aug 29, 2010 at 11:32 AM, André de Boer <rnieuws@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 answer,
> Andre
>
>        [[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]]

