Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with plotting evppi objects? #71

Open
giabaio opened this issue Jan 23, 2025 · 3 comments
Open

Problems with plotting evppi objects? #71

giabaio opened this issue Jan 23, 2025 · 3 comments

Comments

@giabaio
Copy link
Owner

giabaio commented Jan 23, 2025

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?

@n8thangreen
Copy link
Contributor

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?

@giabaio
Copy link
Owner Author

giabaio commented Jan 31, 2025

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

@n8thangreen
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants