| bin_prob | R Documentation |
Bin a sample to a probability vector on an equal grid
bin_prob(x, grid)
x |
numeric sample. |
grid |
numeric vector of equally spaced cell centers. |
A list with elements p (cell probabilities) and dx (cell width).
grid <- seq(-5, 5, length.out = 256)
b <- bin_prob(rnorm(500), grid)
sum(b$p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.