Learn R Programming

gettingtothebottom (version 3.2)

testmatrix: MM Algorithm - Generate Test Matrix

Description

testmatrix Function for generating random rank-r matrix

Usage

testmatrix(m, n, r, seed = 123)

Arguments

m
Number of rows in matrix to be generated
n
Number of columns in matrix to be generated
r
Rank of matrix to be generated (r >= 2)
seed
Random seed

Examples

Run this code
m <- 100
n <- 1000
r <- 5
testmatrix(m,n,r)

Run the code above in your browser using DataLab