Skip to content
Prev 155898 / 398503 Next

Truncating dates (and other date-time manipulations)

One last item that could be of use:

?timeBasedSeq

Lets you create ranges in any standard format, with simple ISO style
formatting. The level of detail you specify is interpreted as the resolution
that is desired.

e.g.
[1] "2000-01-01" "2001-01-01" "2002-01-01" "2003-01-01" "2004-01-01"
[6] "2005-01-01" "2006-01-01" "2007-01-01" "2008-01-01"
[1] "Jan 2000" "Feb 2000" "Mar 2000" "Apr 2000" "May 2000" "Jun 2000"
 [7] "Jul 2000" "Aug 2000" "Sep 2000" "Oct 2000" "Nov 2000" "Dec 2000"
[1] "2000-01-01" "2000-02-01" "2000-03-01" "2000-04-01" "2000-05-01"
 [6] "2000-06-01" "2000-07-01" "2000-08-01" "2000-09-01" "2000-10-01"
[11] "2000-11-01" "2000-12-01"
[1] "2000-01-01" "2000-01-02" "2000-01-03" "2000-01-04" "2000-01-05"
 [6] "2000-01-06" "2000-01-07" "2000-01-08" "2000-01-09" "2000-01-10"
[11] "2000-01-11" "2000-01-12" "2000-01-13" "2000-01-14" "2000-01-15"
[1] "2000-01-01 00:00:00 CST" "2000-01-01 01:00:00 CST"
 [3] "2000-01-01 02:00:00 CST" "2000-01-01 03:00:00 CST"
 [5] "2000-01-01 04:00:00 CST" "2000-01-01 05:00:00 CST"
 [7] "2000-01-01 06:00:00 CST" "2000-01-01 07:00:00 CST"
 [9] "2000-01-01 08:00:00 CST" "2000-01-01 09:00:00 CST"
[11] "2000-01-01 10:00:00 CST"

        
Jeff Ryan wrote:

  
    

Thread (31 messages)

Hadley Wickham Truncating dates (and other date-time manipulations) Sep 11 Whit Armstrong Truncating dates (and other date-time manipulations) Sep 11 Hadley Wickham Truncating dates (and other date-time manipulations) Sep 11 Gabor Grothendieck Truncating dates (and other date-time manipulations) Sep 11 Whit Armstrong Truncating dates (and other date-time manipulations) Sep 11 Avram Aelony database table merging tips with R Sep 11 Aaron Mackey database table merging tips with R Sep 11 Aaron Mackey database table merging tips with R Sep 11 Avram Aelony database table merging tips with R Sep 11 Jeffrey J. Hallman Truncating dates (and other date-time manipulations) Sep 11 Aaron Mackey database table merging tips with R Sep 11 Coey Minear database table merging tips with R Sep 11 Coey Minear database table merging tips with R Sep 11 Hadley Wickham Truncating dates (and other date-time manipulations) Sep 11 Hadley Wickham Truncating dates (and other date-time manipulations) Sep 11 Hadley Wickham Truncating dates (and other date-time manipulations) Sep 11 Marc Schwartz Truncating dates (and other date-time manipulations) Sep 11 Hadley Wickham Truncating dates (and other date-time manipulations) Sep 11 Moshe Olshansky database table merging tips with R Sep 11 Moshe Olshansky database table merging tips with R Sep 11 Gabor Grothendieck Truncating dates (and other date-time manipulations) Sep 11 Hadley Wickham Truncating dates (and other date-time manipulations) Sep 11 Gabor Grothendieck Truncating dates (and other date-time manipulations) Sep 11 Hadley Wickham Truncating dates (and other date-time manipulations) Sep 11 Gabor Grothendieck Truncating dates (and other date-time manipulations) Sep 11 Thomas Lumley database table merging tips with R Sep 11 Jeffrey J. Hallman Truncating dates (and other date-time manipulations) Sep 12 Jeff Ryan Truncating dates (and other date-time manipulations) Sep 12 Jeff Ryan Truncating dates (and other date-time manipulations) Sep 12 Hadley Wickham Truncating dates (and other date-time manipulations) Sep 12 Jeff Ryan Truncating dates (and other date-time manipulations) Sep 12