prv.large | R Documentation |
This function prints the first and last columns and rows of a matrix, and more, if desired. Allows previewing of a matrix without overloading the console. Most useful when data has row and column names.
prv.large( largeMat, rows = 3, cols = 2, digits = 4, rL = "Row#", rlab = "rownames", clab = "colnames", rownums = T, ret = FALSE, warn = TRUE )
largeMat |
a matrix |
rows |
number of rows to display |
cols |
number of columns to display |
digits |
number of digits to display for numeric data |
rL |
row label to describe the row names/numbers, e.g, row number, ID, etc |
rlab |
label to describe the data rows |
clab |
label to describe the data columns |
rownums |
logical, whether to display rownumbers or ignore them |
ret |
logical, whether to return the result as a formatted object, or just print to console |
warn |
logical, whether to warn if the object type is not supported |
mat <- matrix(rnorm(1000),nrow=50) rownames(mat) <- paste("ID",1:50,sep="") colnames(mat) <- paste("Var",1:20,sep="") prv.large(mat) prv.large(mat,rows=9,cols=4,digits=1,rlab="samples",clab="variables",rownums=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.