random_matrix: Create Random Matrix

View source: R/random_matrix.R

random_matrixR Documentation

Create Random Matrix

Description

random_matrix creates a matrix of randomly generated vectors.

Usage

random_matrix(dims = 50, rows = 25, df = FALSE)

Arguments

dims

The number of dimensions (columns) of the random matrix. Defaults to 50.

rows

The number of rows of the random matrix. Defaults to 25.

df

Specify whether the matrix is to be created as data frame object. Defaults to FALSE.

Author(s)

D. Schmitz

Examples


### using default settings

matrix_a <- random_matrix()
dim(matrix_a)

### as data frame object

matrix_b <- random_matrix(df = TRUE)
dim(matrix_b)

### more dimensions

matrix_c <- random_matrix(dims = 100)
dim(matrix_c)

### more rows

matrix_d <- random_matrix(rows = 100)
dim(matrix_d)


dosc91/gdsm documentation built on Aug. 21, 2022, 4:16 a.m.