Skip to contents

Convert interval responses from interval bounds format to compostional/simplex format

Usage

itvl_to_splx(interval_bounds, min = NULL, max = NULL)

Arguments

interval_bounds

Data in the interval bounds format.

min

Minimum of the original response scale.

max

Maximum of the original response scale.

Value

A numeric vector representing a 3-simplex if input is a vector, or a data frame where each row is a 3-simplex if input is a data frame.

See also

splx_to_itvl() for the inverse transformation.

Examples

interval_responses <- data.frame(rbind(c(.1,.5), c(.4,.7)))
itvl_to_splx(interval_responses, min = 0, max = 1)
#>   x_1 x_2 x_3
#> 1 0.1 0.4 0.5
#> 2 0.4 0.3 0.3