norm2pois: Convert normal to poisson

View source: R/distribution_convertors.R

norm2poisR Documentation

Convert normal to poisson

Description

Convert normal to poisson

Usage

norm2pois(x, lambda, mu = mean(x), sd = stats::sd(x))

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)

Value

a vector with a poisson distribution

Examples


x <- rnorm(10000)
y <- norm2pois(x, 2)
g <- ggplot2::ggplot() + ggplot2::geom_point(ggplot2::aes(x, y))
ggExtra::ggMarginal(g, type = "histogram")


faux documentation built on April 20, 2023, 9:13 a.m.