dataframe, since the matrix also has "dimnames" attribute.
- display.correlation <- function(x, alpha = 0.05) {
- namelist <- colnames(x)
- for(j in 1:(ncol(x) - 1))
- {
- for(i in (j + 1):nrow(x))
- if(x[i, j] < alpha)
- cat(namelist[j], "and", namelist[i], "are significantly correlated,
- the correlation coefficient is", x[j, i], "\n")
- }
- }



雷达卡



京公网安备 11010802022788号







