Skip to contents

Internal function that create a named vector to indicate which regression line has what colour.

Usage

create_reg_col_vec(
  plot_first_half_lin_reg = FALSE,
  plot_last_half_lin_reg = FALSE
)

Arguments

plot_first_half_lin_reg

Decide if we plot an extra regression line that best fits the first half of conc_var curve points. Default: FALSE

plot_last_half_lin_reg

Decide if we plot an extra regression line that best fits the last half of conc_var curve points. Default: FALSE

Value

A named vector in which a linear regression is named as "Lin" and is given the colour black. A quadratic regression is named as "Quad" and is given the colour red. A linear regression of the first half of the curve points is named as "Lin First Half" and is given the colour blue. A linear regression of the last half of the curve points is named as "Lin Last Half" and is given the colour purple.

Examples

# Data Creation
regression_colour_vector <- create_reg_col_vec(
  plot_first_half_lin_reg = TRUE,
  plot_last_half_lin_reg = TRUE
)

regression_colour_vector
#>            Lin           Quad Lin First Half  Lin Last Half 
#>        "black"          "red"         "blue"       "purple"