padded_range: Generates axis-wise range limits with padding

Description Usage Arguments Value Examples

View source: R/padded_range.R

Description

For each data axis, finds the minimum and maximum values. Then pads this range by a multiplicative factor of the range interval, and pads again by an additive amount.

Usage

1
padded_range(data, multiply.interval.amount = 0, add.amount = 0)

Arguments

data

A m x n matrix whose range limits should be found.

multiply.interval.amount

A non-negative factor used to multiply the range interval. Can have either dimensionality 1 or n.

add.amount

A non-negative factor used to add to the range limits. Can have either dimensionality 1 or n.

Value

A 2 x n matrix, whose first row is the low value along each axis and whose second row is the high value along each axis.

Examples

1
2
3
data(iris)
iris_rangebox_nopadding = padded_range(iris[,1:3])
iris_rangebox_padding = padded_range(iris[,1:3], multiply.interval.amount=0.5, add.amount=0.1)

dc165/Hypervolume-Dev documentation built on Dec. 13, 2020, 6:02 p.m.