Learn R Programming

ramify (version 0.2.0)

randn: Matrix/Array of Normal Random Numbers

Description

Construct a matrix or multi-way array of normal random deviates.

Usage

randn(nrow = 1, ncol = 1, ..., mean = 0, sd = 1)

Arguments

nrow
The desired number of rows.
ncol
The desired number of columns.
...
Further dimensions of the array.
mean
Mean for the normal distribution. (randn only).
sd
Standard deviation for the normal distribution. (randn only).

Value

  • A matrix or array of pseudorandom numbers.

See Also

rand, randi, rnorm.

Examples

Run this code
randn(100, 100)  # 100 by 100 matrix of standard normal random variates
randn(2, 3, mean = 10, sd = 0.1)

Run the code above in your browser using DataLab