[R] years from as.POSIXlt
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Mar 10 08:13:46 CET 2004
On Wed, 10 Mar 2004, Thomas Petzoldt wrote:
> >as.numeric(format(x, f="%j"))
>
> which is the right code, works perfectly, too.
but the recommended procedure is on the help page ?julian, and of course
works perfectly. Just use 1+x$yday if you want 1-based day of the year.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list