powered by
Returns data frames containing various periods from a time vector as integers.
mdy(x) hms(x) wdydy(x)
returns a data frame containing the periods as integers.
the time object to extract calendar periods from.
time
mdy returns a data frame with three columns:
mdy
month (1 - 12).
month
day (1 - 31).
day
year (for example, 1998).
year
hms returns a data frame with four columns:
hms
hour (0 - 23).
hour
minute (0 - 59).
minute
second (0 - 59).
second
ms (0 - 999).
ms
wdydy returns a data frame with three columns:
wdydy
weekday (0 - 6, with 0 meaning Sunday and 6 meaning Saturday).
weekday
yearday (0 - 366).
yearday
hours, days.
hours
days
x <- timeDate(c("1/1/1998 3:05:23.4", "5/10/2005 2:15:11.234 PM")) mdy(x) hms(x) wdydy(x)
Run the code above in your browser using DataLab