Convert normal to poisson
Arguments
- x
the normally distributed vector
- lambda
the mean of the distribution to return
- mu
the mean of x (calculated from x if not given)
- sd
the SD of x (calculated from x if not given)
Examples
x <- rnorm(10000)
y <- norm2pois(x, 2)
g <- ggplot2::ggplot() + ggplot2::geom_point(ggplot2::aes(x, y))
ggExtra::ggMarginal(g, type = "histogram")