#[1]0·0.3'.0.6','0.8+'0.9*'0.95B'1 #heatmp>heatmap(Ca, symm =TRUE,margins =c(6,6))#with reorder() critical advance privileges rating complaints learning raises 8 装 #heatmp>heatmap(Ca Rowv FALSE, symm TRUE,margins =c(6,6))#_NO_reorder() 公
## [1] 0 ' ' 0.3 '.' 0.6 ',' 0.8 '+' 0.9 '*' 0.95 'B' 1 ## ## heatmp> heatmap(Ca, symm = TRUE, margins = c(6,6)) # with reorder() critical advance privileges rating complaints learning raises raises learning complaints rating privileges advance critical ## ## heatmp> heatmap(Ca, Rowv = FALSE, symm = TRUE, margins = c(6,6)) # _NO_ reorder() 16
privileges rating complaints learning raises critical advance 6une #heatmp>##slightly artificial with color bar,without and with ordering: #heatmp> cc<-rainbow(nrow(Ca)) #heatmp>heatmap(Ca,Rowv-FALSE, symm =TRUE,RowSideColors=cc,ColSideColors =cc, ##heatmpt margins =c(6,6)) 公
privileges rating complaints learning raises critical advance advance critical raises learning complaints rating privileges ## ## heatmp> ## slightly artificial with color bar, without and with ordering: ## heatmp> cc <- rainbow(nrow(Ca)) ## ## heatmp> heatmap(Ca, Rowv = FALSE, symm = TRUE, RowSideColors = cc, ColSideColors = cc, ## heatmp+ margins = c(6,6)) 17
privileges rating complaints learning raises critical advance #heatmp>heatmap(Ca, symm =TRUE,RowSideColors cc,ColSideColors =cc, #heatmp+margins =c(6,6))
privileges rating complaints learning raises critical advance advance critical raises learning complaints rating privileges ## ## heatmp> heatmap(Ca, symm = TRUE, RowSideColors = cc, ColSideColors = cc, ## heatmp+ margins = c(6,6)) 18
critical advance privileges rating complaints learning raises #heatmp>#For variable clustering,rather use distance based on cor(): #heatmp>symnum(cU<-cor(USJudgeRatings)) CO I DM DI CF DE PR F O W PH R #CONT 1 ##INTG 1 #DMNR #群DILG ++1 ##CFMG ++B1 DECI BB 1 ##PREP ++ BBB 1 FAMI ++ **B1 ##ORAL *率BB*本BB1 ##WRIT B++BBB 1 ##PHYS +++++++1 ##RTEN *米*BBB1 attr(,"legend") #[1]0··0.3·.'0.6·,'0.8+'0.9*'0.95B'1 19
critical advance privileges rating complaints learning raises raises learning complaints rating privileges advance critical ## ## heatmp> ## For variable clustering, rather use distance based on cor(): ## heatmp> symnum( cU <- cor(USJudgeRatings) ) ## CO I DM DI CF DE PR F O W PH R ## CONT 1 ## INTG 1 ## DMNR B 1 ## DILG + + 1 ## CFMG + + B 1 ## DECI + + B B 1 ## PREP + + B B B 1 ## FAMI + + B * * B 1 ## ORAL * * B B * B B 1 ## WRIT * + B * * B B B 1 ## PHYS , , + + + + + + + 1 ## RTEN * * * * * B * B B * 1 ## attr(,"legend") ## [1] 0 ' ' 0.3 '.' 0.6 ',' 0.8 '+' 0.9 '*' 0.95 'B' 1 ## 19
#heatmp>hU <-heatmap(cU,Rowv =FALSE,symm =TRUE,col topo.colors(16), #heatmp+ distfun function(c)as.dist(1-c),keep.dendro =TRUE) CONT INTG DMNR PHYS DILG CFMG DECI RTEN ORAL WRIT PREP FAMI 后星薯瞿岩美8面居蛙皇昆 #heatmp>##The Correlation matrix with same reordering: heatmp>round(100+cU[hU[[1]],hU[[2]]]) ## CONT INTG DMNR PHYS DILG CFMG DECI RTEN ORAL WRIT PREP FAMI #C0NT100 -13-155 114 9 -3 -1 -4 1 #INTG 13 100 96 87 81 91 91 ##DMNR -15 96 100 79 84 81 % 9 % 9 #PHYS 5 74 79 100 81 91 % 8 ##DILG 1 84 81 100 96 9 CFMG 14 81 88 100 98 ##DECI 9 80 87 % ” 1 % ##RTEN 3 94 ##ORAL 85 85 600 ##WRIT ¥ 91 89 86 % 1 8 6 85 96 9089 98 5第90 4899 ##FAMI 84 84 % 94 g 98 99 100 #heatmp>#The column dendrogram: 0
## heatmp> hU <- heatmap(cU, Rowv = FALSE, symm = TRUE, col = topo.colors(16), ## heatmp+ distfun = function(c) as.dist(1 - c), keep.dendro = TRUE) CONT INTG DMNR PHYS DILG CFMG DECI RTEN ORAL WRIT PREP FAMI FAMI PREP WRIT ORAL RTEN DECI CFMG DILG PHYS DMNR INTG CONT ## ## heatmp> ## The Correlation matrix with same reordering: ## heatmp> round(100 * cU[hU[[1]], hU[[2]]]) ## CONT INTG DMNR PHYS DILG CFMG DECI RTEN ORAL WRIT PREP FAMI ## CONT 100 -13 -15 5 1 14 9 -3 -1 -4 1 -3 ## INTG -13 100 96 74 87 81 80 94 91 91 88 87 ## DMNR -15 96 100 79 84 81 80 94 91 89 86 84 ## PHYS 5 74 79 100 81 88 87 91 89 86 85 84 ## DILG 1 87 84 81 100 96 96 93 95 96 98 96 ## CFMG 14 81 81 88 96 100 98 93 95 94 96 94 ## DECI 9 80 80 87 96 98 100 92 95 95 96 94 ## RTEN -3 94 94 91 93 93 92 100 98 97 95 94 ## ORAL -1 91 91 89 95 95 95 98 100 99 98 98 ## WRIT -4 91 89 86 96 94 95 97 99 100 99 99 ## PREP 1 88 86 85 98 96 96 95 98 99 100 99 ## FAMI -3 87 84 84 96 94 94 94 98 99 99 100 ## ## heatmp> ## The column dendrogram: 20