y_count_labeler: Generate y-axis Label Based on SWMP Parameter Abbreviation

Description Usage Arguments Details Value Author(s) Examples

View source: R/y_count_labeler.R

Description

Generate a y-axis label based on SWMP parameter abbreviation and threshold criteria

Usage

1
2
3
4
5
6
7
y_count_labeler(
  param,
  parameter_threshold,
  threshold_type,
  time_threshold = NULL,
  converted = FALSE
)

Arguments

param

chr string of variable abbreviation

parameter_threshold

vector of numerical thresholds to evaluate parameters against

threshold_type

vector of logical operators ('<', '>', '<=', '>=', '==', '!=')

time_threshold

The amount of time an event must last to be counted (in hours)

converted

logical, should the parameter label units be converted from metric to english? Defaults to FALSE. Currently available for temp, depth, cdepth, level, clevel, atemp, wspd, maxwspd, and totprcp

Details

A helper function used internally by several plotting functions to generate y-axis labels. This function does not convert sample results from metric to english. It only adjusts the units in the y-axis label.

Value

Returns character vector or an unevaluated expression

Author(s)

Julie Padilla

Examples

1
2
y_lab <- y_count_labeler(param = 'do_mgl', parameter_threshold = 2
, threshold_type = '<', time_threshold = 2, converted = FALSE)

padilla410/SWMPrExtension documentation built on Dec. 29, 2021, 5:48 a.m.