search for: corstarsl

Displaying 1 result from an estimated 1 matches for "corstarsl".

2012 Oct 12
0
Creating a correlation matrix with significance levels
Hi there, I tried this code from homepage: http://myowelt.blogspot.de/2008/04/beautiful-correlation-tables-in-r.html <http://myowelt.blogspot.de/2008/04/beautiful-correlation-tables-in-r.html> corstarsl <- function(x){ require(Hmisc) x <- as.matrix(x) R <- rcorr(x)$r p <- rcorr(x)$P ## define notions for significance levels; spacing is important. mystars <- ifelse(p < .001, "***", ifelse(p < .01, "** ", ifelse(p < .05, "* ", " ")))...