This function uses API of CRAN Logs to scrap the download logs of the packages and then plots the data. It works on objects of class character (vector), deepdep, package_dependencies and package_downloads.

plot_downloads(x, ...)

# S3 method for default
plot_downloads(x, ...)

# S3 method for deepdep
plot_downloads(x, from = Sys.Date() - 365, to = Sys.Date(), ...)

# S3 method for package_dependencies
plot_downloads(x, from = Sys.Date() - 365, to = Sys.Date(), ...)

# S3 method for package_downloads
plot_downloads(x, from = Sys.Date() - 365, to = Sys.Date(), ...)

# S3 method for character
plot_downloads(x, from = Sys.Date() - 365, to = Sys.Date(), ...)

Arguments

x

A character vector. Names of the packages that are on CRAN.

...

Ignored.

from

A Date class object. From which date plot the data. By default it's one year back.

to

A Date class object. To which date plot the data. By default it's now.

Value

A ggplot2 class object.

Examples

library(deepdep) plot_downloads("htmltools")
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'
# \donttest{ dd <- deepdep("ggplot2") plot_downloads(dd)
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'
# }