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 > > ______________________________________________ > [email protected] 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, [EMAIL PROTECTED] 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 ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
