Skip to contents

getmin generates lower bound for a plot where it is unknown whether the minimum 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

getmin(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)
#>  [1] -2.44417458 -1.70817104 -1.51764587  0.03266044  0.10022018  0.48335176
#>  [7]  1.51008995  2.84310256  3.31024435  3.96957180
getmin(vect,mult=1.0)
#> [1] -2.444175