decompose_interval: decompose up intervals

Description Usage Arguments Value

Description

This function decomposes an interval object up into precise observations (e.g. "1850.23;1850.23" into 1850.23), imprecise observations (e.g. "1800;1900") and missing observations ("-Inf;Inf" into NA)

Usage

1

Arguments

interval

A vector, factor or optimally an interval object of length n (if it is something else, it is returned unchanged)

Value

A matrix with 5 columns. 1. A column "precise" for the precise observations (length of interval = 0, e.g. "3000;3000"). If observation i is not precise, the i-th entry in this columns will be NA. c("2500;2500", "3000;4000", "-Inf;0", NA) will lead to c(2500, NA, NA, NA) 2. A column "lower" for the values of the lower bounds of the imprecise observations (length of interval > 0, e.g. "3000;4000" or "-Inf;0"), precise observations will get NAs here. c("2500;2500", "3000;4000", "-Inf;0", NA) will lead to c(NA, 3000, -Inf, NA) 3. A column "upper" for the values of the upper bounds of the imprecise observations. c("2500;2500", "3000;4000", "-Inf;0", NA) will lead to c(NA, 4000, 0, NA) 4. A column "lower_general" with the lower bound values of all observations, without distinction between precise, imprecise or missing observations. c("2500;2500", "3000;4000", "-Inf;0", NA) will lead to c(2500, 3000, -Inf, -Inf) c("2500;2500", "3000;4000", "-Inf;0", NA) will lead to c(2500, 4000, 0, Inf)


hmi documentation built on Oct. 23, 2020, 7:31 p.m.