powered by
Prepares character matrix content for parsing. Removes empty rows and columns, extends content from plausible grouping cells to sparse cells, collapses multiple header rows, and splits multiple model tables to a list of single model tables.
prepareMatrix(x, split = FALSE, forceClass = NULL, na.rm = TRUE, legend = NULL)
A character matrix
character matrix
Logical. If TRUE, multi-model matrices are split into a list of single-model matrices.
Character. Set matrix-specific handling to one of c("tabled result", "correlation", "matrix, "text").
Logical. If TRUE, NA cells are set to empty cells.
Character. Optional, text from table caption and/or footnote for table class specific processing.
# example matrix x<-cbind(c("","","name","","",""), c("group","name","A","B","","C"), c("value","","1","2","","3")) x # apply function prepareMatrix(x)
Run the code above in your browser using DataLab