View source: R/insertRowAndKeepAttr.R
insertRowAndKeepAttr | R Documentation |
Inserts a row and keeps the attributes copyAllNewAttributes
insertRowAndKeepAttr(m, r, v = NA, rName = "")
m |
matrix |
r |
row number where the new row should be inserted |
v |
optional values for the new row |
rName |
optional character string: the name of the new row. |
matrix
Returns a matrix with one more row than the provided matrix m
Max Gordon, Arne Henningsen
test <- matrix(1:4, ncol = 2)
attr(test, "wow") <- 1000
test <- insertRowAndKeepAttr(test, 2)
print(attr(test, "wow"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.