staticPlots: function that generates visual trends of the package...

View source: R/plotting-utils.R

staticPlotsR Documentation

function that generates visual trends of the package downloads logs from CRAN, it will generate 4 plots: two histograms, a pulse plot and the main plot is a plot of the downloads as a function of time

Description

function that generates visual trends of the package downloads logs from CRAN, it will generate 4 plots: two histograms, a pulse plot and the main plot is a plot of the downloads as a function of time

Usage

staticPlots(
  pckg.stats.total,
  device = "PDF",
  fileName = paste0("DWNLDS_", pckg.stats.total$package[1], ".", tolower(device)),
  dirSave = NULL,
  combinePlts = FALSE,
  noMovAvg = FALSE,
  noConfBands = FALSE,
  cutOff.pts = 250,
  dbg = FALSE
)

Arguments

pckg.stats.total

total downloads from the package

device

string to select the output format: 'PDF'/'PNG'/'JPEG' or 'screen'

fileName

an optional string argument specifying the name of the file where to save the plots

dirSave

specify a valid directory where to save the plot

combinePlts

a boolean indicating whether the plots generated will be combined into one single figure or not

noMovAvg

a boolean indicating whether moving statistical estimators, such as, the moving average will be displayed

noConfBands

a boolean indicating whether a confidence band will be displayed

cutOff.pts

an integer value indicating the cut-off value to determine whether there would be a subsample for clarity sake in the plots

dbg

internal flag for activating debugging options, i.e. display furhter information in screen

Examples


packageData <- retrievePckgData("ggplot2")
totalDownloads <- packageData[[1]]
#lastmonthDownloads <- packageData[[2]]
staticPlots(totalDownloads, device="screen")
staticPlots(totalDownloads,combinePlts=TRUE, device="screen")



Visualize.CRAN.Downloads documentation built on March 31, 2023, 7:21 p.m.