getminy: getminy generates the lower bound for a plot

View source: R/datalow_utils.r

getminyR Documentation

getminy generates the lower bound for a plot

Description

getminy generates a lower bound for a plot where it is unknown whether the minumum is less than zero of not. If less than 0 then multiplying by the default mult of 1.05 works well but if the outcome if > 0 then the multiplier needs to be adjusted appropriately so the minimum is slightly lower than the minimum of the data

Usage

getminy(x, mult = 1.05)

Arguments

x

the vector of data to be tested for its minimum

mult

the multiplier for both ends, defaults to 1.05 (=0.95 if >0)

Value

a suitable lower bound for a plot if required

Examples

vect <- rnorm(10,mean=0,sd=2)
sort(vect)
getminy(vect,mult=1.0)

haddonm/datalowSA documentation built on Nov. 5, 2023, 6:40 p.m.