aphalo / ggpmisc

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

Handle failure to converge in `stat_multcomp()` #58

Closed aphalo closed 5 months ago

aphalo commented 5 months ago

Add 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.

The problem was revelead by tests. See #54.

aphalo commented 5 months ago

The convergence failure was in mvtnorm::pmvnorm() and making maxpts in the call to summary() increase with the number of levels in the factor seems to solve the problem, at least up to 10 levels and Tukey contrasts. Fixed.