Description Usage Arguments Value Examples
View source: R/matrix_extend.R
Adds n
rows and columns with NA
values on all sides of a matrix
.
1 | matrix_extend(m, n = 1, fill = NA)
|
m |
A |
n |
By how many rows/columns to extend the matrix on each side? |
fill |
Fill value (default is |
An extended matrix
1 2 3 4 5 | m = matrix(1:6, nrow = 2, ncol = 3)
m
matrix_extend(m, 1)
matrix_extend(m, 2)
matrix_extend(m, 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.