lubridate包:处理时间数据

lubridate是一款强大的R包,专为处理日期和时间数据设计。它提供了ymd、mdy、ymd_hms等便捷的组合函数来解析日期时间,还支持interval类操作,如interval函数创建interval对象,is.interval()检查是否为interval类型,int_length()计算interval的长度(秒)。此外,time_length()函数用于计算时间间隔,make_date()和make_datetime()则用于创建日期和日期时间。
摘要由CSDN通过智能技术生成

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
  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值