lubridate包
处理日期时间的包
简要描述:Make Dealing with Dates a Little Easier
(1)ymd,mdy,ymd_hms等组合函数
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 th