check_probability_vector {oeli} | R Documentation |
This function checks whether the input is a real vector with non-negative entries that add up to one.
check_probability_vector(x, len = NULL, tolerance = sqrt(.Machine$double.eps))
assert_probability_vector(
x,
len = NULL,
tolerance = sqrt(.Machine$double.eps),
.var.name = checkmate::vname(x),
add = NULL
)
test_probability_vector(x, len = NULL, tolerance = sqrt(.Machine$double.eps))
x |
Object to check. |
len |
[ |
tolerance |
A non-negative |
.var.name |
[ |
add |
[ |
Compare to check_numeric
.