matchColumns: Match number of columns

Description Usage Arguments Details Examples

View source: R/utilities_math.R

Description

Internal soundgen function

Usage

1
matchColumns(matrix_short, nCol, padWith = 0)

Arguments

matrix_short

input matrix

nCol

the required number of columns

padWith

the value to pad with, normally 0 or NA

Details

Adds columns of zeros or NA to a matrix (attaching them both left and right), so that the new number of columns = len

Examples

1
2
a = matrix(1:9, nrow = 3)
soundgen:::matchColumns(a, nCol = 6, padWith = NA)

soundgen documentation built on Oct. 4, 2018, 9:04 a.m.