View source: R/distribution_convertors.R
norm2norm | R Documentation |
Convert a normal distribution to a normal (gaussian) distribution with specified mu and sd
norm2norm(x, mu = 0, sd = 1, x_mu = mean(x), x_sd = stats::sd(x))
x |
the uniformly distributed vector |
mu |
the mean of the normal distribution to return |
sd |
the SD of the normal distribution to return |
x_mu |
the mean of x (calculated from x if not given) |
x_sd |
the SD of x (calculated from x if not given) |
a vector with a gaussian distribution
x <- rnorm(10000)
y <- norm2norm(x, 100, 10)
g <- ggplot2::ggplot() + ggplot2::geom_point(ggplot2::aes(x, y))
ggExtra::ggMarginal(g, type = "histogram")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.