plot.cranDownloads: Plot method for cranDownloads().

View source: R/cranDownloads.R

plot.cranDownloadsR Documentation

Plot method for cranDownloads().

Description

Plot method for cranDownloads().

Usage

## S3 method for class 'cranDownloads'
plot(x, statistic = "count", graphics = "auto",
  points = "auto", log.y = FALSE, smooth = FALSE, se = FALSE,
  f = 1/3, span = 3/4, package.version = FALSE, r.version = FALSE,
  population.plot = FALSE, population.seed = as.numeric(Sys.Date()),
  multi.plot = FALSE, same.xy = TRUE, legend.location = "topleft",
  ip.legend.location = "topright", r.total = FALSE, dev.mode = FALSE,
  unit.observation = "day", multi.core = FALSE, ...)

Arguments

x

object.

statistic

Character. "count" or "cumulative".

graphics

Character. "auto", "base" or "ggplot2".

points

Character of Logical. Plot points. "auto", TRUE, FALSE.

log.y

Logical. Logarithm of package downloads.

smooth

Logical. Add smoother.

se

Logical. Works only with graphics = "ggplot2".

f

Numeric. smoother window for stats::lowess(). For graphics = "base" only; c.f. stats::lowess(f)

span

Numeric. Smoothing parameter for geom_smooth(); c.f. stats::loess(span).

package.version

Logical. Add latest package release dates.

r.version

Logical. Add R release dates.

population.plot

Logical. Plot population plot.

population.seed

Numeric. Seed for sample in population plot.

multi.plot

Logical.

same.xy

Logical. Use same scale for multiple packages when graphics = "base".

legend.location

Character.

ip.legend.location

Character. Location of in-progress legend.

r.total

Logical.

dev.mode

Logical. Use packageHistory0() to scrape CRAN.

unit.observation

Character. "year", "month", "week", or "day".

multi.core

Logical or Numeric. TRUE uses parallel::detectCores(). FALSE uses one, single core. You can also specify the number logical cores. Mac and Unix only.

...

Additional plotting parameters.

Value

A base R or ggplot2 plot.

Examples

## Not run: 
plot(cranDownloads(packages = c("Rcpp", "rlang", "data.table")))
plot(cranDownloads(packages = c("Rcpp", "rlang", "data.table"), when = "last-month"))
plot(cranDownloads(packages = "R", from = "2020-01-01", to = "2020-01-01"))
plot(cranDownloads(packages = "R", from = 2020))

## End(Not run)

packageRank documentation built on Oct. 16, 2024, 9:06 a.m.