matchColumns | R Documentation |
Internal soundgen function
matchColumns(
matrix_short,
nCol,
padWith = 0,
padDir = "central",
interpol = c("approx", "spline")[1]
)
matrix_short |
input matrix |
nCol |
the required number of columns |
padWith |
the value to pad with, normally |
padDir |
specifies the affected side. For padding, it is the side on which new elements will be added. For trimming, this is the side that will be trimmed. Defaults to 'central' |
Adds columns of new values (eg zeros or NAs) to a matrix, so that the new
number of columns = len
a = matrix(1:9, nrow = 3)
soundgen:::matchColumns(a, nCol = 6, padWith = NA, padDir = 'central')
soundgen:::matchColumns(a, nCol = 6, padWith = 0, padDir = 'central')
soundgen:::matchColumns(a, nCol = 6, padWith = NA, padDir = 'left')
soundgen:::matchColumns(a, nCol = 6, padWith = 'a', padDir = 'right')
soundgen:::matchColumns(a, nCol = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.