标签: r time type-conversion
我有一系列从1到288的数字,我想转换1到11:00,2到11:05,3到11:10,等等。我该怎么做?
答案 0 :(得分:9)
假设time是指POSIXct对象:
time
start <- as.POSIXct(x = "11:00", format = "%H:%M") seq(from = start, by = "5 mins", length.out = 288)