Download daily downloads stats from CRAN for any package, and plot.
It can also be used as an auxiliary function to plot
(cranlogs::cran_downloads
) results.
Arguments
- input
Character vector with package names or data.frame product of
cranlogs::cran_downloads
.- from, to
Dates. Range of dates to fetch downloads metrics.
- type
Character. Any of: "daily" or "total".
- plot
Boolean. Create a plot?
Examples
# \donttest{
cran_logs(c("lares", "dplyr"), from = "2021-05-31")
#> $df
#> # A tibble: 2,114 × 3
#> date count package
#> <date> <int> <chr>
#> 1 2024-04-21 58 lares
#> 2 2024-04-21 29720 dplyr
#> 3 2024-04-20 66 lares
#> 4 2024-04-20 35871 dplyr
#> 5 2024-04-19 131 lares
#> 6 2024-04-19 55357 dplyr
#> 7 2024-04-18 141 lares
#> 8 2024-04-18 59864 dplyr
#> 9 2024-04-17 171 lares
#> 10 2024-04-17 61633 dplyr
#> # ℹ 2,104 more rows
#>
#> $plot
#>
# }