library(dplyr)
library(ggplot2)
data(tidyverse_cran_downloads)
tidyverse_cran_downloads %>%
filter(package == "tidyquant") %>%
ungroup() %>%
time_decompose(count, method = "stl") %>%
anomalize(remainder, method = "iqr") %>%
plot_anomaly_decomposition()
Run the code above in your browser using DataLab