powered by
mixture
Test whether an object is a mixture distribution.
is_mixture(x)
TRUE if x inherits from "mixture", FALSE otherwise.
TRUE
x
"mixture"
FALSE
The object to test.
m <- mixture(list(normal(0, 1), normal(5, 2)), c(0.5, 0.5)) is_mixture(m) is_mixture(normal(0, 1))
Run the code above in your browser using DataLab