r_matrix {rando} | R Documentation |
Generate a random Matrix
Description
Generate a random matrix, given a rando function and it's dimensions. By default, this will generate a square matrix.
Usage
r_matrix(
engine,
row_names = NULL,
col_names = NULL,
...,
nrow = default_n(row_names),
ncol = default_n(col_names),
.seed = NULL
)
Arguments
engine |
The rando function that will be used to generate the random numbers |
col_names , row_names |
names to be assigned to the rows or columns. This is also used in deciding the dimensions of the result. |
... |
Unused |
nrow , ncol |
dimensions of the matrix. The |
.seed |
One of the following:
To extract the random seed from a previously generated set of
values, use |
Value
A matrix with nrow
rows and ncol
columns an a type as
decided by the function passed to engine
.
Examples
set_n(5)
r_matrix(r_norm)
r_matrix(r_unif,min=1,max=2)
r_matrix(r_norm,mean=10,sd=2,ncol=2)