Learn R Programming

ramify (version 0.2.0)

randi: Matrix/Array of Uniform Random Integers

Description

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

Usage

randi(imax, nrow, ncol = 1, ...)

Arguments

imax
A positive integer.
nrow
The desired number of rows.
ncol
The desired number of columns.
...
Further dimensions of the array.

Value

  • A matrix or array of pseudorandom numbers.

See Also

rand, randn, sample.

Examples

Run this code
randi(2, 5, 5)

Run the code above in your browser using DataLab