R: Simulation of random values from a normal distribution

Simulation of random values from a normal distribution {Rfast} | R Documentation

## Simulation of random values from a normal distribution

### Description

Simulation of random values from a normal distribution.

### Usage

    Rnorm(n, m = 0, s = 1)

### Arguments

`n` | The sample size.
`m` | The mean, set to 0 by default.
`s` | The standard devation, set to 1 by default.

### Details

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.

### Value

A vector with n values.

### Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <mtsagris@yahoo.gr>

### See Also

`matrnorm, rvonmises, rvmf, rmvnorm`

### Examples

    x <- Rnorm(500)

[Package Rfast version 2.0.0 Index]