plot_incr_arm: Plot change between readings, by arm

View source: R/plot_incr_arm.R

plot_incr_armR Documentation

Plot change between readings, by arm

Description

Plot change between readings, by arm

Usage

plot_incr_arm(data, set = NULL, threshold = 25, columns = 4,
  pointsize = 2, scales = "fixed")

Arguments

data

data frame (e.g. '$arm' piece of output from 'calc_change_incr()') with one row per faceting variable, and the following columns, named exactly: date, set_id, arm_position, mean_incr. 'mean_incr' should be an already-calculated field of change since previous reading

set

optional SET ID if you only want to look at one SET; default is to graph all SETs

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_arm(incr_set$arm)
plot_incr_arm(incr_set$arm, threshold = 5, columns = 1)
plot_incr_arm(incr_set$arm, set = "SET2", threshold = 5)

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