Return Various Periods from a Time Vector

DESCRIPTION:

Return data frames containing various periods from a time vector, as integers.

USAGE:

mdy(x) 
hms(x) 
wdydy(x) 

REQUIRED ARGUMENTS:

x
the time object to extract calendar periods from.

VALUE:

a data frame containing the periods as integers.

DETAILS:

mdy returns a data frame with three columns, month (1 - 12), day (1 - 31), and year (e.g., 1998). hms returns a data frame with four columns, hour (0 - 23), minute (0 - 59), second (0 - 59), and ms (0 - 999). wdydy returns a data frame with three columns, weekday (0 - 6, with 0 meaning Sunday and 6 Saturday), yearday (0 - 366), and year (e.g., 1998).

SEE ALSO:

, .

EXAMPLES:

x <- timeDate(c("1/1/1998 3:05:23.4", "5/10/2005 2:15:11.234 PM")) 
mdy(x) 
hms(x) 
wdydy(x)