easystats / performance

:muscle: Models' quality and performance metrics (R2, ICC, LOO, AIC, BF, ...)
https://easystats.github.io/performance/
GNU General Public License v3.0
965 stars 87 forks source link

incorrect warning with old `ggplot2`/failure to load `see` #692

Open bbolker opened 4 months ago

bbolker commented 4 months ago

In dealing with the ggplot2 version 3.5 mess (see https://github.com/easystats/performance/issues/691), I accidentally reverted to version 3.4.0 instead of 3.4.4. If I then library("see") directly I get

> library(see)
Error: package or namespace load failed for ‘see’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 namespace ‘ggplot2’ 3.4.0 is being loaded, but >= 3.4.4 is required

but if I run performance::check_model(), it encounters the failure and assumes that the cause is that I don't have see installed.

performance::check_model(g1)
Package `see` required for model diagnostic plots.
Would you like to install it? [y/n] 

it then re-installs, fails to show the plot (as expected), and returns the raw object.

strengejacke commented 4 months ago

So the correct warning would be in this case: could not load package see?

bbolker commented 4 months ago

Yes. Ideally it would be good to pass through some information about the error.