specify_range: Create data frame with equal ranges for all groups

Description Usage Arguments Value

View source: R/specify_range.R

Description

Given a data frame with values corresponding to different groups, defines a data frame "range" with min and max values for each group such that the real data can be centered around the midpoint but all subplots cover the same range (1 unit on plot A = 1 unit on plot B).

Usage

1
2
3
4
5
6
7
specify_range(
  df,
  group_col,
  value_col,
  tick_precision = NA,
  pfl_is_long = FALSE
)

Arguments

df

a data frame with columns for the group and corresponding values

group_col

name of the group column

value_col

name of the values column

tick_precision

round range to nearest X, inclusive (e.g., 0.1, 0.5, etc.)

pfl_is_long

logical defaults to FALSE to maintain separate ranges for Long and Plainfield lakes. If TRUE, forces plainfield to use range for long.

Value

range, a data frame with a column for "group" and another column for "value" (real names: group_col and value_col) with min and max values for each group.


WDNR-Water-Use/CSLSlevels documentation built on Nov. 21, 2020, 9:13 a.m.