Format a mixture object as a character string.

# S3 method for class 'mixture'
format(x, ...)

Arguments

x

A mixture object.

...

Additional arguments (not used).

Value

A character string describing the mixture.

Examples

m <- mixture(list(normal(0, 1), normal(5, 1)), c(0.5, 0.5))
format(m)
#> [1] "Mixture distribution (2 components)"