This is a convenience function to visually highlight values that fall outside the data range via a flexible condition statement, plus_minus_value cutoff from the mean, or plus_minus_sd standard deviation cutoff from the mean. Optionally with a text label to make it easier to identify the analysis.

iso_mark_outliers(
  p,
  condition = NULL,
  plus_minus_value = NULL,
  plus_minus_sd = sd_cutoff,
  sd_cutoff = NULL,
  label = NULL,
  size = 2,
  shape = 16,
  color = "black"
)

Arguments

p

a ggplot object, typically generated by iso_plot_data

condition

any filter expression to identify outliers

plus_minus_value

value cutoff to identify outliers (mean +/- value)

plus_minus_sd

standard deviation cutoff to identify outliers (mean +/- sd)

sd_cutoff

renamed to the more descriptive plus_minus_sd

label

optional expression to add a label to the outlier points

size

size of the outlier points

shape

shape of the outlier points

color

color of the outlier points

See also