Description Usage Arguments Details Value Examples
View source: R/CombineCollinearRowsCols.R
Removes rows and columns of zeros and optionnally, row or column duplicates
1 | CombineCollinearRowsCols(Y, rows = F, cols = F)
|
Y |
A matrix or an object that can be coerced to a matrix |
rows |
Logical: Will duplicate rows be removed? |
cols |
Logical: Will duplicate columns be removed? |
Rows and columns of zeros will be removed.
A matrix of zeros will be returned as matrix with 0 row and 0 column.
If rows 1,2,3 are combined, the name of row 1 is kept. Similarly for columns.
A matrix with rows and columns removed as requested
1 2 3 4 5 6 7 8 9 | CombineCollinearRowsCols(matrix(1:3,nrow=3,ncol=2),cols=TRUE)
CombineCollinearRowsCols(cbind(matrix(1:3,nrow=3,ncol=2),rep(0,3)),cols=TRUE)
CombineCollinearRowsCols(cbind(matrix(1:3,nrow=3,ncol=2),rep(0,3)))
CombineCollinearRowsCols(matrix(0,nrow=3,ncol=3))
CombineCollinearRowsCols(rodent,TRUE,FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.