plot_loocv_rmse: Function to make violin plots of MSE

View source: R/plot_loocv_rmse.R

plot_loocv_rmseR Documentation

Function to make violin plots of MSE

Description

Reads in output from leave-one-out cross-validation and makes a violin plot of prediction error and RMSPE. If make_plot is TRUE, writes a png file. Returns a ggplot object.

Usage

plot_loocv_rmse(
  sel_paths = dir("./output/loocv", full.names = TRUE),
  y_lab = NULL,
  make_plot = TRUE,
  sel_var = NA,
  by_cruise = FALSE,
  suffix = "",
  fig_res = 600
)

Arguments

sel_paths

File paths to loocv output files

y_lab

Y axis label as a character vector (i.e. "RSPE"). Default = NULL

make_plot

Should a plot be generated

sel_var

Character vector indicating what the variable name should be (used to name plot that is written to output)

by_cruise

Logical. Should panels be divided by cruise? Default = FALSE plots panels by year.

suffix

Text to append to a plot file name.

fig_res

Resolution for the figure.


afsc-gap-products/coldpool documentation built on Sept. 14, 2024, 7:40 p.m.