View source: R/plot_incr_pin.R
plot_incr_pin | R Documentation |
Plot change between readings, by pin
plot_incr_pin(data, set, threshold = 25, columns = 2, pointsize = 2,
scales = "fixed")
data |
data frame (e.g. '$pin' piece of output from 'calc_change_incr()') with one row per faceting variable, and the following columns, named exactly: date, set_id, arm_position, pin_number, incr. 'incr' should be an already-calculated field of change since previous reading. |
set |
SET ID to graph (required) |
threshold |
numeric value for red horizontal lines (at +/- this value); this should be a value that would be a meaningful threshold for incremental change. |
columns |
number of columns for faceted output |
pointsize |
size of points you want (goes into the 'size' argument of 'ggplot2::geom_point') |
scales |
passed to 'facet_wrap'; same fixed/free options as that function |
a ggplot object
incr_set <- calc_change_incr(example_sets)
plot_incr_pin(incr_set$pin, set = "SET1")
plot_incr_pin(incr_set$pin, set = "SET1", threshold = 5)
plot_incr_pin(incr_set$pin, set = "SET2", threshold = 5, columns = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.