Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (41 sloc) 1.45 KB
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{cran_downloads}
\alias{cran_downloads}
\title{Daily package downloads from the RStudio CRAN mirror}
\usage{
cran_downloads(package = NULL, when = c("last-day", "last-week",
"last-month"), from = "last-day", to = "last-day")
}
\arguments{
\item{package}{A package to query, or \code{NULL} for a sum of
downloads for all packages.}
\item{when}{\code{last_day}, \code{last_week} or \code{last_month}.
If this is given, then \code{from} and \code{to} are ignored.}
\item{from}{Start date, in \code{yyyy-mm-dd} format, or
\code{yesterday}. It is ignored if \code{when} is given.}
\item{to}{End date, in \code{yyyy-mm-dd} format, or
\code{yesterday}. It is ignored if \code{when} is given.}
}
\value{
A list with entries: \itemize{
\item \code{downloads} The downloads, in a two-column data frame:
date and download count.
\item \code{start} Start date.
\item \code{end} End date.
\item \code{package} The queried package. This entry is missing
if the total number of downloads for all packages was queried.
}
}
\description{
Daily package downloads from the RStudio CRAN mirror
}
\examples{
## All downloads yesterday
cran_downloads()
## All downloads for 'dplyr' yesterday
cran_downloads(package = "dplyr")
## Daily downloads for 'igraph' last week
cran_downloads(package = "igraph", when = "last-week")
## Downloads in the specified time interval
cran_downloads(from = "2014-06-30", to = "2014-08-08")
}