Introduction
This R
package queries download stats of R
packages.
For CRAN packages, it queries from RStudio download logs.
For Bioconductor packages, it queries from Bioconductor download stats.
Download stats of CRAN packages
library("ggplot2")
library("dlstats")
<- cran_stats(c("emojifont", "ggimage", "hexSticker", "rvcheck"))
x
if (!is.null(x)) {
head(x)
ggplot(x, aes(end, downloads, group=package, color=package)) +
geom_line() + geom_point(aes(shape=package))
}
Download stats of Bioconductor packages
<- c("ChIPseeker", "clusterProfiler", "DOSE", "ggtree", "GOSemSim", "ReactomePA")
pkgs <- bioc_stats(pkgs)
y
if (!is.null(y)) {
head(y)
ggplot(y, aes(end, Nb_of_downloads, group=package, color=package)) +
geom_line() + geom_point(aes(shape=package))
library("tidyr")
<- gather(y, type, Nb, Nb_of_distinct_IPs:Nb_of_downloads)
yy
ggplot(yy, aes(end, Nb, shape=package, color=package)) +geom_point() + geom_line() +
ylab(NULL) + xlab(NULL) + facet_grid(type~., scales="free_y") +
ggtitle("Number of downloads per Month") +
scale_x_date(date_breaks="1 year", date_labels = "%Y")
}
Shiny apps
We also provide shiny app for visualizing download stats of R packages.
User can use cranApp()
or biocApp()
for CRAN
packages and Bioconductor
packages respectively.
biocApp()