performance icon indicating copy to clipboard operation
performance copied to clipboard

check_model() shows nothing on some PCs

Open jebyrnes opened this issue 2 years ago • 8 comments

I have a few students using PCs with the Rstudio for whom check_model() produces no output. It's fine if they use the base R GUI on their PC or if they render check_model() in quarto. But in Rstudio itself, it's just a blank plot. They've even tried exporting it as an image in case the viewport was weird, and it just exports a blank image. For two of them, they gave me their setup. I can collect more info if that would be helpful.

Note - this happens regardless of dataset - it's a general issue.

Setups for students:

  1. R version 4.3.1
  2. RStudio version: 2023.06.1 Build 524 "Mountain Hydrangea"
  3. Performance version 0.10.5
  4. Windows version: 22H2 (OS Build 22621.2361)\

 

  1. R version: 4.3.1
  2. RStudio version: "Desert Sunflower" Release (b51c81cc, 2023-09-25) for windows
  3. Package performance version 0.10.5
  4. Windows version: 22H2 (OS Build 19045.3448)

jebyrnes avatar Oct 06 '23 20:10 jebyrnes

Can you share some screenshots of what they are seeing and also share their hardware information (especially graphics card and display driver)?

bwiernik avatar Oct 07 '23 01:10 bwiernik

Could you also ask them to try to "make the image panel bigger". I remember having a similar issue on laptops with small screens, and making a bigger plot panel worked. Not sure if that's the same issue butt it's worth a try

DominiqueMakowski avatar Oct 07 '23 08:10 DominiqueMakowski

You may read this long thread: https://github.com/easystats/performance/issues/536

Have you updated to the latest package versions? In that case, check_model() should return an informative warning/error message:

image

I think that msg covers most/all possible solutions to your problem.

strengejacke avatar Oct 07 '23 11:10 strengejacke

We are having the same problem on a couple of students' PCs. check_model(m) runs with no errors or warnings, but only produces a blank canvas. We've got one student on Debian and one on Windows 10. Windows 10 was a standard 13" screen running the recommended 150% Scaling. We managed to fix it with a combination of changing Scaling (in Windows) and Zoom in RStudio, so the size is the underlying issue here as well.

However, this renders the rest of RStudio unbearably small and doesn't seem to be a good long term solution. Could a solution be to run the plots sequentially with a warning when the plot window is too small for the patchwork version?

Everyone is running freshly updated R, RStudio, performance, see and patchwork.

roaldarbol avatar Oct 18 '23 10:10 roaldarbol

You can try check_model(..., panel = FALSE), which should return single plots. I haven't faced this issue with VSCode yet, so I'm not sure if it's a particular issue with this combination of RStudio, Windows and increased scaling?

strengejacke avatar Oct 18 '23 16:10 strengejacke

This works great for me (on Mac), thanks! I can report back tomorrow. I think there's definitely an element of the combination, but I'm really not sure why it can get away with not even producing the informative error message although producing a blank plot.

The ...panel = FALSE solution is acting a bit odd to me, though it might not be an issue:

  • If I call check_model(..., panel = FALSE) on its own, no plots are produced, contrary to panel = TRUE. I'd expect it to output the plots.
  • But if I call check_model(..., panel = FALSE) |> plot() that produces all the plots. Great!
  • However, if I only want to then call one of the plots, I'd imagine I could run model_checks <- check_model(..., panel = FALSE) then plot(model_checks[1]), but that produces the error Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' is a list, but does not have components 'x' and 'y'. That's quite unexpected behaviour to me.

roaldarbol avatar Oct 18 '23 17:10 roaldarbol

See the code of this vignette for plotting single panels: https://github.com/easystats/performance/blob/main/vignettes/check_model.Rmd

strengejacke avatar Oct 19 '23 22:10 strengejacke