Learn R Programming

accrued (version 1.2)

uploadPattern: Function to create an upload pattern plot

Description

This function creates an upload pattern plot for partially accruing data showing dates at which new data was received for each encounter date.

Usage

uploadPattern(x, horizontal = FALSE, ...)

Arguments

x
An object of the accrued class.
horizontal
logical value; if TRUE a compact horizontal plot is generated, if FALSE a diagonal upload plot is generated.
...
Parameters to pass to plot.

Value

  • None.

Details

A diagonal upload pattern plot displays for each encounter date ($x$-axis) whether or not new data was received at each upload date ($y$-axis). A horizontal upload pattern plot displays for each encounter date ($x$-axis) whether or not new data were received $y$ days after the encounter date. Note that this function calls the "stackedUploadData" which should only be used on count data. If data were received containing 0 or negative counts, pixels are colored in gray. Otherwise they are dark blue.

See Also

stackedUploadData, barcode, plot.accrued, plot.summary.accrued, lagHistogram

Examples

Run this code
data(accruedDataExample)			
	dat <- data.accrued(accruedDataExample)	
	uploadPattern(dat)				# Diagonal plot (default)
	dev.new(height = 1.5, width = 10)		# Horizontal plot - best short and wide
	uploadPattern(dat, horizontal = TRUE)

Run the code above in your browser using DataLab