Problems with plotting evppi objects?
I think there may be an issue with plots for evppi objects? I think there's a hidden plot.evppi function/method that works. So if I do
x=evppi(...)
BCEA:::plot.evppi(x)
then things work well (with different graphical engines too). But if I try
x=evppi(...)
plot(x)
(which used to work in previous versions), then there's an error:
Error in `fortify()`:
! `data` must be a <data.frame>, or an object coercible by `fortify()`, or a valid <data.frame>-like object coercible by `as.data.frame()`.
Caused by error in `.prevalidate_data_frame_like_object()`:
! `dim(data)` must return an <integer> of length 2.
@n8thangreen is there an easy fix we can bring when making the new changes to the dev version?
Hi, I've ran the evppi examples using the latest release on my dev branch and they seem fine. heres the output evppi.pdf
could you send me the complete code that produces the error, please?
Using the code you have in the script you shared, I get
> plot(EVPPI)
Error in `fortify()`:
! `data` must be a <data.frame>, or an object coercible by `fortify()`, or a valid <data.frame>-like object coercible by `as.data.frame()`.
Caused by error in `.prevalidate_data_frame_like_object()`:
! `dim(data)` must return an <integer> of length 2.
Run `rlang::last_trace()` to see where the error occurred.
I am on the CRAN version (2.4.7) -- not sure what's fundamentally different though?...
So I went through the latest commits and the CRAN submission is 14th Jan but there are some small (what I thought were harmless) changes on that date too in between it getting accepted. It seems that one of those makes the difference. However, I don't know what the change is exactly! I did use BCEA::evppi internally to make sure there wasnt a conflict but this was a couple of commits before the working commit. I think the easiest thing to do is just patch the latest release with 2.4.7.1?
Sounds like a plan. I haven't got a complain from people so perhaps we can fix this together with the rest of the code?