尝试查找两天之间的时间间隔时出现上述错误。
x <- as.POSIXct(strptime(as.character(wo_data$In.Progress.time),"%m/%d/%Y %I:%M:%S %p"))
class(x)
# [1] "POSIXct" "POSIXt"
wo_data$super.schedule.inprogress <-
as.numeric(difftime(x, wo_data$schedule.time, units = "hours"))
# Error in as.POSIXct.default(time1) :
# do not know how to convert 'time1' to class POSIXct
# In addition: Warning messages:
# 1: Too many values at 103 locations: 608, 617, 659, 724, 753, 754, 755,
# 802, 1029, 1030, 1031, 1037, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, ...
# 2: Too few values at 3170 locations: 60, 109, 110, 112, 114, 118, 119,
# 120, 121, 122, 161, 163, 167, 172, 197, 202, 206, 207, 208, 209, ...
# 3: 3 failed to parse.
即使 R 成功转换wo_data$In.Progress.time
为课堂时间向量,为什么会发生这种情况的任何想法?
提前谢谢你,伊莱