cranlogs (version 2.1.1)

cran_downloads: Daily package downloads from the RStudio CRAN mirror

Description

Daily package downloads from the RStudio CRAN mirror

Usage

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

Run this code
# NOT RUN {
## Default is last day for which data is available.
cran_downloads()

## All downloads for 'dplyr' in the last day for which data is available.
cran_downloads(packages = "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")

## Downloads in the specified time interval
cran_downloads(from = "2014-06-30", to = "2014-08-08")

## Multiple packages
cran_downloads(packages = c("ggplot2", "plyr", "dplyr"))

## R downloads
cran_downloads("R")
# }

Run the code above in your browser using DataLab