create_example_sparse_matrix: Create example sparse matrix

Description Usage Arguments Value Examples

View source: R/matrix_functions.R

Description

Creates an example sparse matrix.

Usage

1
create_example_sparse_matrix(n_row, n_col, p_zero = 0.8, matrix_values = 1:9)

Arguments

n_row

number of rows in matrix

n_col

number of columns in matrix

p_zero

(optional, default 0.8) proportion of entries to set to zero (in expectation)

matrix_values

(optional, default 1:9) a vector of numeric values from which to sample

Value

A random matrix of dimension n_row by n_col.

Examples

1

Timothy-Barry/ravel documentation built on Oct. 16, 2020, 12:40 a.m.