cranDownloads: Daily package downloads from the RStudio CRAN mirror.

Description Usage Arguments Examples

View source: R/cranDownloads.R

Description

Enhanced implementation of cranlogs::cran_downloads().

Usage

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

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## 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 Sept. 16, 2020, 5:58 a.m.