coltable {SensoMineR} | R Documentation |
Return a colored display of a data frame according to 4 threshold levels.
coltable(matrice, col.mat = matrice, nbrow = nrow(matrice), nbcol = ncol(matrice), level.lower = 0.05, col.lower = "mistyrose", level.upper = 1.96, col.upper = "lightblue", cex = 0,nbdec = 4, main.title = NULL, level.lower2 = -1e10, col.lower2 = "red", level.upper2 = 1e10, col.upper2 = "blue", novalue = FALSE)
matrice |
a data frame (or a matrix) with only quantitative variables |
col.mat |
a data frame (or a matrix) from which the cells of the |
nbrow |
the number of rows to be displayed (by default, |
nbcol |
the number of columns to be displayed (by default, |
level.lower |
the threshold below which cells are colored in |
col.lower |
the color used for |
level.upper |
the threshold above which cells are colored in |
col.upper |
the color used for |
cex |
cf. function |
nbdec |
the number of decimal places displayed |
main.title |
title of the graph(s) |
level.lower2 |
the threshold below which cells are colored in |
col.lower2 |
the color used for |
level.upper2 |
the threshold above which cells are colored in |
col.upper2 |
the color used for |
novalue |
boolean, if TRUE the values are not written |
This function is very useful especially when there are a lot of values to check.
F Husson, S Le
## Example 1 data(chocolates) resdecat<-decat(sensochoc, formul = "~Product+Panelist", firstvar = 5, graph = FALSE) resaverage<-averagetable(sensochoc, formul = "~Product+Panelist", firstvar = 5) resaverage.sort = resaverage[rownames(magicsort(resdecat$tabT)), colnames(magicsort(resdecat$tabT))] coltable(resaverage.sort, magicsort(resdecat$tabT), level.lower = -1.96, level.upper = 1.96, main.title = "Average by chocolate") ## Example 3 ## Not run: data(chocolates) resperf<-paneliperf(sensochoc, formul = "~Product+Panelist+Product:Panelist", formul.j = "~Product", col.j = 1, firstvar = 5, lastvar = 12, synthesis = FALSE, graph = FALSE) resperfprob<-magicsort(resperf$prob.ind, method = "median") coltable(resperfprob, level.lower = 0.05, level.upper = 1, main.title = "P-value of the F-test (by panelist)") resperfr2<-magicsort(resperf$r2.ind, method = "median", ascending = FALSE) coltable(resperfr2, level.lower = 0.00, level.upper = 0.85, main.title = "Adjusted R-square (by panelist)") ## End(Not run)