View source: R/prepCorrTable.R
prepCorrTable | R Documentation |
function to make a nice correlation table for latex/Rmd usage example: pTable <- rcorr() tabl <- prepCorrTable(DT) %>% xtable::xtable(.) print(tabl, type = "html. Adapted from http://myowelt.blogspot.com/2008/04/beautiful-correlation-tables-in-r.html
prepCorrTable(x = NULL, corTable = NULL, pTable = NULL, method = "pearson")
x |
a matrix or any object compatible with as.matrix, from where the covariance matrix will be calculated. alternatively, corTable and pTable matrices can be supplied. |
corTable |
matrix of correlation values obtained from e.g. |
pTable |
matrix of pTable-values values obtained from e.g. |
method |
see |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.