| density.mixture | R Documentation |
Returns a function that evaluates the mixture density at given points.
The mixture density is f(x) = \sum_k w_k f_k(x).
## S3 method for class 'mixture'
density(x, ...)
x |
A |
... |
Additional arguments (not used). |
A function function(t, log = FALSE, ...) returning the
density (or log-density) at t.
m <- mixture(list(normal(0, 1), normal(5, 1)), c(0.5, 0.5))
f <- density(m)
f(0)
f(2.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.