coltable             package:SensoMineR             R Documentation

_C_o_l_o_r _t_h_e _c_e_l_l_s _o_f _a _d_a_t_a _f_r_a_m_e _a_c_c_o_r_d_i_n_g _t_o _4 _t_h_r_e_s_h_o_l_d _l_e_v_e_l_s

_D_e_s_c_r_i_p_t_i_o_n:

     Return a colored display of a data frame according to 4 threshold
     levels.

_U_s_a_g_e:

     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)

_A_r_g_u_m_e_n_t_s:

 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
          'matrice' data frame are colored; by default,
          'col.mat'='matrice'

   nbrow: the number of rows to be displayed (by default,
          'nrow(matrice)')

   nbcol: the number of columns to be displayed (by default,
          'ncol(matrice)')

level.lower: the threshold below which cells are colored in 'col.lower'

col.lower: the color used for 'level.lower'

level.upper: the threshold above which cells are colored in 'col.upper'

col.upper: the color used for 'level.upper'

     cex: cf. function 'par' in the 'graphics' package

   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'; this level should be less than level.lower

col.lower2: the color used for 'level.lower2'

level.upper2: the threshold above which cells are colored in
          'col.upper2'; this level should be greater than level.upper

col.upper2: the color used for 'level.upper2'

 novalue: boolean, if TRUE the values are not written

_D_e_t_a_i_l_s:

     This function is very useful especially when there are a lot of
     values to check.

_A_u_t_h_o_r(_s):

     Franois Husson, Sbastien L

_E_x_a_m_p_l_e_s:

     ## 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)

