1. 程式人生 > >lubridate包:處理時間資料

lubridate包:處理時間資料


Identify the order in which the year, month, and day appears in your dates. Now arrange “y”, “m”, and “d” in the same order. This is the name of the function in lubridate that will parse your dates. 
ymd("20110604")
mdy("06-04-2011")
dmy("04/06/2011")


If your date includes time information, add h, m, and/or s to the name of the function. ymd_hms() is probably the most common date time format. To read the dates in with a certain time zone, supply the official name of that time zone in the tz argument.