unif2norm: Convert uniform to normal

Description Usage Arguments Value Examples

View source: R/distribution_convertors.R

Description

Convert a uniform distribution to a normal (gaussian) distribution with specified mu and sd

Usage

1
unif2norm(x, mu = 0, sd = 1, min = NULL, max = NULL)

Arguments

x

the uniformly distributed vector

mu

the mean of the normal distribution to return

sd

the SD of the normal distribution to return

min

the minimum possible value of x (calculated from x if not given)

max

the maximum possible value of x (calculated from x if not given)

Value

a vector with a gaussian distribution

Examples

1
2
3
4
x <- runif(10000)
y <- unif2norm(x)
g <- ggplot2::ggplot() + ggplot2::geom_point(ggplot2::aes(x, y))
ggExtra::ggMarginal(g, type = "histogram")

faux documentation built on Sept. 14, 2021, 1:08 a.m.