Learn R Programming

hypervolume (version 2.0.12)

padded_range: Generates axis-wise range limits with padding

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

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

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab