appropriateLimits: default limits for plotting values

View source: R/limits.R

appropriateLimitsR Documentation

default limits for plotting values

Description

default limits for plotting values

Usage

appropriateLimits(x, limits = NULL, default = c(0, 1))

Arguments

x

vector of numeric or POSIXt (min, max must be able to be applied).

limits

vector of two elements. Default: NULL.

default

vector of two elements. Default: c(0, 1)

Value

returns limits if limits is a vector of two non-NA values. If the first element of limits is NA it is replaced with the minimum of x (or with default[1] if the minimum is NA). If the second element of limits is NA it is replaced with the maximum of x (or with default[2] if the maximum is NA).


KWB-R/kwb.plot documentation built on Oct. 2, 2023, 10:16 p.m.