create_exampleplot: create_exampleplot helper function

View source: R/create_exampleplot.R

create_exampleplotR Documentation

create_exampleplot helper function

Description

Internal function to create an example plot.

Usage

create_exampleplot(
  data,
  coef_hyper,
  coef_cubic,
  plot_height,
  plot_width,
  plot_textsize,
  filename
)

Arguments

data

A data.table containing the aggregated calibration data.

coef_hyper

A list containing the regression parameters of the hyperbolic regression equation.

coef_cubic

A list containing the regression parameters of the cubic regression equation.

plot_height

A integer value. The height (unit: inch) of the resulting plots (default: 5).

plot_width

A integer value. The width (unit: inch) of the resulting plots (default: 7.5).

plot_textsize

A integer value. The textsize of the resulting plots (default: 16).

filename

A character. The filename, where to store the resulting example plot.

Value

The function creates an example plot and stores on the local filesystem.

Examples

gdat <- rBiasCorrection::example._plot.df_agg

coef_h <- rBiasCorrection::example._plot_coef_h
coef_c <- rBiasCorrection::example._plot_coef_c

create_exampleplot(
  data = gdat,
  coef_hyper = coef_h,
  coef_cubic = coef_c,
  plot_height = 5,
  plot_width = 7.5,
  plot_textsize = 1,
  filename = paste0(tempdir(), "/exampleplot.png")
)


rBiasCorrection documentation built on June 21, 2022, 1:05 a.m.