Skip to content

Instantly share code, notes, and snippets.

@BlasBenito
Last active July 15, 2022 12:50
Show Gist options
  • Save BlasBenito/70e7d17be7a4fb2f21430ba7cb71c75b to your computer and use it in GitHub Desktop.
Save BlasBenito/70e7d17be7a4fb2f21430ba7cb71c75b to your computer and use it in GitHub Desktop.
#R script to plot the CRAN download history of a set of packages
library(dlstats)
library(ggplot2)
target.packages <- c("ranger", "randomForest", "xgboost")
x <- dlstats::cran_stats(packages = target.packages)
ggplot2::ggplot(data = x) +
ggplot2::aes(
x = end,
y = downloads,
group = package,
color = package
) +
ggplot2::geom_line() +
ggplot2::theme_bw()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment