sensoTable | R Documentation |
Colors a flextable based on the result of a SensoMineR::decat according to 2 threshold levels.
sensoTable(
res.decat,
thres = 0.05,
thres2 = 0,
col.neg = "#ff7979",
col.neg2 = "#eb4d4b",
col.pos = "#7ed6df",
col.pos2 = "#22a6b3"
)
res.decat |
result of a SensoMineR::decat |
thres |
the threshold under which cells are colored col.neg (or col.pos) if the tested coefficient is significantly lower (or higher) than the average |
thres2 |
the threshold under which cells are colored col.neg2 (or col.pos2); this threshold should be lower than thres |
col.neg |
the color used for thres when the tested coefficient is negative |
col.neg2 |
the color used for thres2 when the tested coefficient is negative |
col.pos |
the color used for thres when the tested coefficient is positive |
col.pos2 |
the color used for thres2 when the tested coefficient is positive |
This function is useful to highlight elements which are significant, especially when there are many values to check
Returns a formatted flextable
### Example 1
data("sensochoc")
# Use the decat function
resdecat <-SensoMineR::decat(sensochoc, formul="~Product+Panelist", firstvar = 5, graph = FALSE)
sensoTable(resdecat)
### Example 2
data("sensochoc")
resdecat2 <-SensoMineR::decat(sensochoc, formul="~Product+Panelist", firstvar = 5, graph = FALSE)
sensoTable(resdecat2,thres2=0.01) # Add a second level of significance
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.