Daily package downloads from the RStudio CRAN mirror

cran_downloads(packages = NULL, when = c("last-day", "last-week",
  "last-month"), from = "last-day", to = "last-day")

Arguments

packages

A character vector, the packages to query, or NULL for a sum of downloads for all packages. Alternatively, it can also be "R", to query downloads of R itself. "R" cannot be mixed with packages.

when

last-day, last-week or last-month (see details). If this is given, then from and to are ignored.

from

Start date, in yyyy-mm-dd format, or last-day. It is ignored if when is given.

to

End date, in yyyy-mm-dd format, or last-day. It is ignored if when is given.

Value

For packages a data frame with columns:

package

The package. This column is missing if all packages were queried.

date

Day of the downloads, it is a Date object.

count

Download count.

For downloads of R, there are also columns for the operating system (os) and the R version (version).

Details

last-day is the last day for which data is available, last-week is from 6 days prior to that last day with data, last-month is from 29 days prior to that last day with data.

0 counts can be due to the non-availability of data on the RStudio server for that day.

See also

Other CRAN downloads: cran_top_downloads

Examples

# \dontrun{ ## Default is last day for which data is available. cran_downloads()
#> date count #> 1 2019-12-01 2742948
## All downloads for 'dplyr' in the last day for which data is available. cran_downloads(packages = "dplyr")
#> date count package #> 1 2019-12-01 26430 dplyr
## Daily downloads for 'igraph' last week ## (6 days prior to the last day for which data is available) cran_downloads(packages = "igraph", when = "last-week")
#> date count package #> 1 2019-11-25 7376 igraph #> 2 2019-11-26 8058 igraph #> 3 2019-11-27 8250 igraph #> 4 2019-11-28 13436 igraph #> 5 2019-11-29 10138 igraph #> 6 2019-11-30 5092 igraph #> 7 2019-12-01 5183 igraph
## Downloads in the specified time interval cran_downloads(from = "2014-06-30", to = "2014-08-08")
#> date count #> 1 2014-06-30 211630 #> 2 2014-07-01 167871 #> 3 2014-07-02 145978 #> 4 2014-07-03 156735 #> 5 2014-07-04 121388 #> 6 2014-07-05 85680 #> 7 2014-07-06 88702 #> 8 2014-07-07 173305 #> 9 2014-07-08 225455 #> 10 2014-07-09 204074 #> 11 2014-07-10 196067 #> 12 2014-07-11 186799 #> 13 2014-07-12 128945 #> 14 2014-07-13 100936 #> 15 2014-07-14 186627 #> 16 2014-07-15 194915 #> 17 2014-07-16 181111 #> 18 2014-07-17 191137 #> 19 2014-07-18 173551 #> 20 2014-07-19 109991 #> 21 2014-07-20 103021 #> 22 2014-07-21 206653 #> 23 2014-07-22 177675 #> 24 2014-07-23 186140 #> 25 2014-07-24 150904 #> 26 2014-07-25 160480 #> 27 2014-07-26 100130 #> 28 2014-07-27 82237 #> 29 2014-07-28 142225 #> 30 2014-07-29 151380 #> 31 2014-07-30 176169 #> 32 2014-07-31 167655 #> 33 2014-08-01 238507 #> 34 2014-08-02 88788 #> 35 2014-08-03 89176 #> 36 2014-08-04 240695 #> 37 2014-08-05 311740 #> 38 2014-08-06 237572 #> 39 2014-08-07 229844 #> 40 2014-08-08 181458
## Multiple packages cran_downloads(packages = c("ggplot2", "plyr", "dplyr"))
#> date count package #> 1 2019-12-01 22036 ggplot2 #> 2 2019-12-01 16977 plyr #> 3 2019-12-01 26430 dplyr
## R downloads cran_downloads("R")
#> date version os count #> 1 2019-12-01 3.6.1 NA 2 #> 2 2019-12-01 devel NA 2 #> 3 2019-12-01 latest NA 2 #> 4 2019-12-01 2.10.0 osx 1 #> 5 2019-12-01 2.14.1 osx 1 #> 6 2019-12-01 3.2.1 osx 5 #> 7 2019-12-01 3.2.4 osx 1 #> 8 2019-12-01 3.3.3 osx 41 #> 9 2019-12-01 3.4.1 osx 2 #> 10 2019-12-01 3.4.3 osx 3 #> 11 2019-12-01 3.4.4 osx 21 #> 12 2019-12-01 3.5.0 osx 3 #> 13 2019-12-01 3.5.2 osx 1 #> 14 2019-12-01 3.5.3 osx 33 #> 15 2019-12-01 3.6.0 osx 1 #> 16 2019-12-01 3.6.1 osx 489 #> 17 2019-12-01 latest osx 263 #> 18 2019-12-01 2.15.0 src 1 #> 19 2019-12-01 3.0.1 src 1 #> 20 2019-12-01 3.0.2 src 1 #> 21 2019-12-01 3.1.1 src 3 #> 22 2019-12-01 3.2.2 src 1 #> 23 2019-12-01 3.4.0 src 1 #> 24 2019-12-01 3.4.1 src 4 #> 25 2019-12-01 3.4.4 src 13 #> 26 2019-12-01 3.5.1 src 2 #> 27 2019-12-01 3.5.2 src 1 #> 28 2019-12-01 3.5.3 src 3 #> 29 2019-12-01 3.6.0 src 1 #> 30 2019-12-01 3.6.1 src 97 #> 31 2019-12-01 2.13.2 win 1 #> 32 2019-12-01 3.0.0 win 2 #> 33 2019-12-01 3.1.0 win 1 #> 34 2019-12-01 3.2.1 win 4 #> 35 2019-12-01 3.2.3 win 1 #> 36 2019-12-01 3.3.3 win 5 #> 37 2019-12-01 3.4.2 win 1 #> 38 2019-12-01 3.4.4 win 6 #> 39 2019-12-01 3.5.0 win 1 #> 40 2019-12-01 3.5.1 win 2 #> 41 2019-12-01 3.5.2 win 1 #> 42 2019-12-01 3.5.3 win 6 #> 43 2019-12-01 3.6.0 win 12 #> 44 2019-12-01 3.6.1 win 1814 #> 45 2019-12-01 3.6.1patched win 274 #> 46 2019-12-01 devel win 71
# }