aphalo / ggpmisc

R package ggpmisc is an extension to ggplot2 and the Grammar of Graphics
https://docs.r4photobiology.info/ggpmisc
94 stars 6 forks source link

`stat_multcomp()` Add tests for factors with more than 5 levels #54

Closed aphalo closed 4 months ago

aphalo commented 4 months ago

User reports seem to indicate that contrast = "Dunnet" fails with more than 5 factor levels. Error message for contrast = "Tukey" with > 5 levels could be replaced by a warning and override of settings to use letters.

Tests with factors with more that 5 levels are needed.

aphalo commented 4 months ago

Added three tests but had to comment two of them out as errrors are triggered within package 'multcomp' with the current data. Fixed two bugs related to letter labels for Tukey contrasts and added some unit tests.

aphalo commented 4 months ago

Code to catch the error from package 'multcomp' (seems to be failure of convergence) and handle this in a way visible in the plot, or simply not show the test results.

aphalo commented 4 months ago

This is not a testing problem any longer. Opened #58