我想测试Anomalize r包的异常检测问题。 检查the github page后,我尝试了他们提供的示例代码:
library(anomalize)
tidyverse_cran_downloads %>%
# Data Manipulation / Anomaly Detection
time_decompose(count, method = "stl") %>%
anomalize(remainder, method = "iqr") %>%
time_recompose() %>%
# Anomaly Visualization
plot_anomalies(time_recomposed = TRUE, ncol = 3, alpha_dots = 0.25) +
labs(title = "Tidyverse Anomalies", subtitle = "STL + IQR Methods")
但是,我收到以下错误:
Error in mutate_impl(.data, dots) :
'arg' should be one of “second”, “minute”, “hour”, “day”, “week”,
“month”, “year”
我无法调试。有人可以帮忙吗? 如果有用,我使用R版本3.4.3。
干杯!