plot_incr_pin: Plot change between readings, by pin

View source: R/plot_incr_pin.R

plot_incr_pinR Documentation

Plot change between readings, by pin

Description

Plot change between readings, by pin

Usage

plot_incr_pin(data, set, threshold = 25, columns = 2, pointsize = 2,
  scales = "fixed")

Arguments

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

Value

a ggplot object

Examples

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)

swmpkim/SETr documentation built on May 6, 2024, 11:15 p.m.