mixture
R/mixture.R
is_mixture.Rd
Test whether an object is a mixture distribution.
is_mixture(x)
The object to test.
TRUE if x inherits from "mixture", FALSE otherwise.
TRUE
x
"mixture"
FALSE
m <- mixture(list(normal(0, 1), normal(5, 2)), c(0.5, 0.5)) is_mixture(m) #> [1] TRUE is_mixture(normal(0, 1)) #> [1] FALSE