check_probability_vector {oeli} | R Documentation |
Check probability vector
Description
These functions check whether the input fulfills the properties of a probability matrix.
Usage
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))
Arguments
x |
[any] |
len |
[ |
tolerance |
[ |
.var.name |
[ |
add |
[ |
Value
Same as documented in check_numeric
.
See Also
Other vector helpers:
check_numeric_vector()
,
chunk_vector()
,
insert_vector_entry()
,
match_numerics()
,
permutations()
,
split_vector_at()
,
subsets()
,
vector_occurrence()
Examples
p <- c(0.2, 0.3, 0.6)
check_probability_vector(p)
test_probability_vector(p)
## Not run:
assert_probability_vector(p)
## End(Not run)
[Package oeli version 0.7.0 Index]