insertCol | R Documentation |
Insert Row into a Matrix
insertCol(m, c, v = NA, cName = "")
m |
(Required). a matrix. |
c |
(Required). numeric. column number where the new column should be inserted. |
v |
(optional). numeric. values for the new column. |
cName |
(optional). character. the name of the new column. |
a matrix with one more column than the provided matrix m.
Created by Hua Zou (5/19/2022 Shenzhen China)
https://github.com/cran/miscTools/
## Not run:
m <- matrix(1:4, 2)
insertCol(m, 2, 5:6)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.