Skip to contents

Convert from simplex/compostional format to interval bound format

Usage

splx_to_itvl(simplex, min = NULL, max = NULL)

Arguments

simplex

Data in the simplex/compositional format.

min

Minimum of the original response scale.

max

Maximum of the original response scale.

Value

A numeric vector with 2 elements representing interval bounds if input is a vector, or a data frame where each row contains interval bounds if input is a data frame.

See also

itvl_to_splx() for the inverse transformation.

Examples

responses <- data.frame(rbind(c(.1,.5,.4), c(.3,.4,.3)))
splx_to_itvl(responses, min = 0, max = 1)
#>   x_lo x_up
#> 1  0.1  0.6
#> 2  0.3  0.7