cranDownloads: Daily package downloads from the RStudio CRAN mirror.

View source: R/cranDownloads.R

cranDownloadsR Documentation

Daily package downloads from the RStudio CRAN mirror.

Description

Enhanced implementation of cranlogs::cran_downloads().

Usage

cranDownloads(packages = NULL, when = NULL, from = NULL, to = NULL,
  check.package = TRUE, dev.mode = FALSE, fix.cranlogs = TRUE)

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. If this is given, then from and to are ignored.

from

Start date as yyyy-mm-dd, yyyy-mm or yyyy.

to

End date as yyyy-mm-dd, yyyy-mm or yyyy.

check.package

Logical. Validate and "spell check" package.

dev.mode

Logical. Use validatePackage0() to scrape CRAN.

fix.cranlogs

Logical. Use RStudio logs to fix 8 dates with duplicated data in 'cranlogs' results.

Examples

## Not run: 
cranDownloads(packages = "HistData")
cranDownloads(packages = "HistData", when = "last-week")
cranDownloads(packages = "HistData", when = "last-month")

# January 7 - 31, 2019
cranDownloads(packages = "HistData", from = "2019-01-07", to = "2019-01-31")

# February through March 2019
cranDownloads(packages = "HistData", from = "2019-02", to = "2019-03")

# 2020 year-to-date
cranDownloads(packages = "HistData", from = 2020)

## End(Not run)

lindbrook/packageRank documentation built on April 30, 2024, 7:39 a.m.