tests/valid_proportion.R

library(freedom)

stopifnot(!freedom:::valid_proportions(c(0.4, 0.3)))
stopifnot(freedom:::valid_proportions(c(0.7, 0.3)))
stopifnot(freedom:::valid_proportions(c(0.7, 0.2, 0.1)))
stopifnot(freedom:::valid_proportions(1))
stopifnot(!freedom:::valid_proportions(-1))
stopifnot(!freedom:::valid_proportions(2))

Try the freedom package in your browser

Any scripts or data that you put into this service are public.

freedom documentation built on Oct. 9, 2026, 5:07 p.m.