barplot for the number of users installation of a package

Share:

Description

This function gets a vector of package names, and returns a line plot of number of downloads for these packages per week.

Usage

1
2
lineplot_package_downloads(pkg_names, dataset, by_time = c("date", "week"),
  ...)

Arguments

pkg_names

a character vector of packages we are interested in checking.

dataset

a dataset output from running read_RStudio_CRAN_data, after going through format_RStudio_CRAN_data.

by_time

by what time frame should packages be plotted? defaults to "date", but can also be "week"

...

not in use.

Details

RStudio maintains its own CRAN mirror, https://cran.rstudio.com/ and offers its log files.

Value

invisible aggregated data that was used for the plot

Author(s)

Felix Schonbrodt, Tal Galili

Source

http://www.nicebread.de/finally-tracking-cran-packages-downloads/

See Also

download_RStudio_CRAN_data, read_RStudio_CRAN_data,barplot_package_users_per_day

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
# The first two functions might take a good deal of time to run (depending on the date range)
RStudio_CRAN_data_folder <- 
      download_RStudio_CRAN_data(START = '2013-04-02',
                                 END = '2013-04-05') 
                                 # around the time R 3.0.0 was released
my_RStudio_CRAN_data <- read_RStudio_CRAN_data(RStudio_CRAN_data_folder)
my_RStudio_CRAN_data <- format_RStudio_CRAN_data(my_RStudio_CRAN_data)
head(my_RStudio_CRAN_data)
lineplot_package_downloads(pkg_names = c("ggplot2", "reshape", "plyr", "installr"),
                           dataset = my_RStudio_CRAN_data)

# older plots:
# barplots: (more functions can easily be added in the future)
barplot_package_users_per_day("installr", my_RStudio_CRAN_data)
barplot_package_users_per_day("plyr", my_RStudio_CRAN_data)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.