\donttest{ if (!requireNamespace("ggplot2", quietly = TRUE)) utils::install.packages( "ggplot2", repos = "https://cloud.r-project.org", quiet = TRUE ) ggplot2::ggplot(bitcoin, ggplot2::aes(x = date, y = price)) + ggplot2::geom_line() result <- suppressWarnings( fastcpd.garch(diff(log(bitcoin$price[200:500])), c(1, 1)) ) summary(result) bitcoin$date[result@cp_set + 200] plot(result) }