View source: R/random_values_simulation.R
Simulation of random values from a normal distribution | R Documentation |
Simulation of random values from a normal distribution.
Rnorm(n, m = 0, s = 1, seed = NULL)
n |
The sample size. |
m |
The mean, set to 0 by default. |
s |
The standard devation, set to 1 by default. |
seed |
If you want the same to be generated again use a seed for the generator, an integer number. |
By using the Ziggurat method of generating standard normal variates, this function is really fast when you want to generate large vectors. For less than 2,000 this might make no difference when compared with R's "rnorm", but for 10,000 this will be 6-7 times faster.
A vector with n values.
Michail Tsagris
R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr>
matrnorm, rvonmises, rvmf, rmvnorm
x <- Rnorm(500)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.