Permalink
Switch branches/tags
Nothing to show
Find file
3ab1b92 Jul 27, 2015
82 lines (55 sloc) 1.82 KB
knitr::opts_chunk$set(
  comment = "#>",
  tidy = FALSE,
  error = FALSE)

Download logs from the RStudio CRAN mirror

Linux Build Status Windows Build status CRAN version CRAN RStudio mirror downloads

RStudio publishes the download logs from their CRAN package mirror daily at http://cran-logs.rstudio.com.

This R package queries a database that contains the daily download numbers for each package.

Installation

You can install cranlogs from Github:

library(devtools)
install_github("metacran/cranlogs")

Usage

It has a very simple API. By default it shows the total number of package downloads from the previous day.

library(cranlogs)
cran_downloads()

The last week, or the last month can be also easily queried:

cran_downloads(when = "last-week")

The package argument queries a specific package:

cran_downloads(when = "last-week", package = c("magrittr", "dplyr"))

Alternative intervals can also be specified:

cran_downloads(package = "plyr", from = "2014-01-01", to = "2014-02-01")

For downloads of R itself, give "R" instead of a package:

cran_downloads("R")

Top downloaded packages

Last day:

cran_top_downloads()

Last week:

cran_top_downloads("last-week")

Raw JSON API

See here.