Learn R Programming

ramify (version 0.2.0)

rand: Matrix/Array of Uniform Random Numbers

Description

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

Usage

rand(nrow = 1, ncol = 1, ..., min = 0, max = 1)

Arguments

nrow
The desired number of rows.
ncol
The desired number of columns.
...
Further dimensions of the array.
min
Lower limit for the uniform distribution. Must be finite. (rand only).
max
Upper limit for the uniform distribution. Must be finite. (rand only).

Value

  • A matrix or array of pseudorandom numbers.

See Also

randi, randn, runif.

Examples

Run this code
rand(100, 100)  # 100 by 100 matrix of uniform random numbers
rand(2, 3, min = 100, max = 200)

Run the code above in your browser using DataLab