R/is_prob.R

Defines functions is_prob

is_prob <- function(x) {

  is.numeric(x) &&
    length(x) == 1 &&
    x <= 1 &&
    x >= 0
}
Health-Economics-in-R/QALY documentation built on Oct. 26, 2020, 2:28 a.m.