我想测试 Anomalize r 包的异常检测问题。检查github 页面后,我尝试了他们提供的示例代码:
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。
干杯!