我有这个时间序列数据:
"timestamp" "depth" "from_sensor_to_river_bottom" "Depth_from_river_surface_to_bottom"
"1" "2012-05-23 18:30:12-05" 16.4 17.16 0.760000000000002
"2" "2012-05-23 18:15:08-05" 16.38 17.16 0.780000000000001
"3" "2012-05-23 18:00:03-05" 16.39 17.16 0.77
"4" "2012-05-23 17:45:13-05" 16.35 17.16 0.809999999999999
"5" "2012-05-23 17:30:08-05" 16.37 17.16 0.789999999999999
我正在使用以下代码:
d <- read.table(Name[1], header=TRUE) #Name[1] is text file containing data
d <- read.zoo(d,
format="'%Y-%m-%d %H:%M:%S'",
FUN=as.POSIXct )
它给了我这个错误:
Error in read.zoo(d, format = "'%Y-%m-%d %H:%M:%S'", FUN = as.POSIXct) :
index has 5 bad entries at data rows: 1 2 3 4 5
我希望在这个问题上得到帮助。谢谢您的考虑。