• R语言
  • AnomalyDetectionTs报错:arguments imply differing number of rows: 2, 0

跟着这个网页里的内容学习R异常检测,并有源码:https://github.com/pablo14/anomaly_detection_post
但遇到如下报错:
data_anomaly = AnomalyDetectionTs(fifa_data, max_anoms=0.01, direction="pos", e_value = T)
Error in data.frame(timestamp = all_anoms[[1]], anoms = all_anoms[[2]], :
arguments imply differing number of rows: 2, 0
经百度google一通搜索看不出原因,请各位指教,
补充信息:fifa_data 如下:
print(fifa_data)
date views
34 2018-02-03 67

65 2018-03-06 82

209 2018-07-28 84

31 2018-01-31 85

72 2018-03-13 85

133 2018-05-13 93

136 2018-05-16 99

201 2018-07-20 159

199 2018-07-18 220

169 2018-06-18 534

... 204 rows of data not shown