Skip to contents

Creates a calibration curve plot from SEC calibration data or a prepped recipe with conventional calibration.

Usage

plot_sec_calibration(
  data,
  retention_col = "retention_time",
  mw_col = "log_mp",
  show_residuals = FALSE,
  show_r_squared = TRUE,
  ...
)

Arguments

data

Either:

  • A data frame of calibration standards with retention and log_mw columns

  • A prepped recipe containing a conventional calibration step

retention_col

Name of retention time/volume column. Default is "retention_time".

mw_col

Name of log MW column. Default is "log_mp".

show_residuals

Logical. Show residual plot below? Default is FALSE.

show_r_squared

Logical. Show R-squared value? Default is TRUE.

...

Additional arguments passed to ggplot2::geom_point().

Value

A ggplot2 object (or patchwork of plots if show_residuals = TRUE).

Examples

if (FALSE) { # \dontrun{
# Plot calibration from standards data
plot_sec_calibration(sec_ps_standards)

# With residuals panel
plot_sec_calibration(sec_ps_standards, show_residuals = TRUE)
} # }