R语言与数据分析实战8-时段类函数

第1关:时段之intervals

任务描述
时段可以分为三大类,即intervals、durations和periods。其中最为基本的便是intervals间隔,本关卡将向大家讲授intervals的基本概念、创建方法以及相关运算法则。

相关知识
间隔的输入
间隔intervals是指特定的时间跨度。一个interval是两个特定时刻之间的时间。时间间隔的长度从不模棱两可,因为我们知道它的发生时间,任何时间都可以计算确切长度。

#####    R_interval.R#####
library(lubridate)
###### begin ######
#Output the result.
start1 <- ymd_hms("20141003,12:00:00"

猜你喜欢

转载自blog.csdn.net/Junds0/article/details/132988504