[R] timeAlign

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Apr 11 08:45:46 CEST 2006


Are you looking for trunc.POSIXt?  That does the -1 direction, and its 
code could easily be adapted (or just add one unit).

I don't see what this has to do with 'align'.

On Mon, 10 Apr 2006, Omar Lakkis wrote:

> I use POSIXct for datetimes. Is thee a timeAlign function that I can
> use where :
>
> align by year
>      direction -1 ==> start of this year
>      direction 1  ==> start of next year
> align by week
>      direction -1 ==> date on last sunday
>      direction 1  ==> date on next sunday
> align by day
>      direction -1 ==> time at past midnight
>      direction 1  ==> time at this comming midnight
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
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