iso_mark_value_range: Visualize value range

Description Usage Arguments See Also

Description

This is a convenience function to visualize value ranges (mean +/- std. deviation) with horizontal lines in a plot, typically one generated by iso_plot_data. Considers aesthetics color and group as well as the facet variables (if any are set) to calculate averages within each panel, color and group. This leaves the aesthetics fill and shape to be used for other purposes in displaying data points.

Usage

1
2
3
4
5
6
7
8
iso_mark_value_range(
  p,
  mean = TRUE,
  plus_minus_value = c(),
  plus_minus_sd = sd,
  sd = 1:2,
  color = NULL
)

Arguments

p

a ggplot object, typically generated by iso_plot_data

mean

logical (default TRUE), whether to show a line for the value mean

plus_minus_value

which fixed value intervals to show (mean +/- fixed), by default none are included.

plus_minus_sd

which standard deviation intervals to show (mean +/- sd), by default +/- 1 and +/-2 population std. deviations. To omit these intervals, set sd = c().

sd

renamed to the more descriptive plus_minus_sd

color

use to override inherited color aesthetics with a fixed value and thus create value ranges that average across all data points in a panel (for this to work, make sure the group aesthetic of the parent plot does NOT include the color aesthetic). Has to be a valid color string, e.g. "black" or "#ffab05". If omitted or color = NULL, the color aesthetic from the plot is inherited (the default behavior).

See Also

Other plot functions: iso_mark_calibration_range(), iso_mark_outliers(), iso_mark_x_range(), iso_plot_continuous_flow_data(), iso_plot_data(), iso_plot_dual_inlet_data(), iso_plot_raw_data(), iso_plot_ref_peaks(), iso_plot_residuals(), iso_plot_scan_data(), iso_prepare_continuous_flow_plot_data(), iso_prepare_dual_inlet_plot_data(), iso_prepare_scan_plot_data()


KopfLab/isoprocessorCUB documentation built on Nov. 8, 2021, 9:54 a.m.