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

Extract plot method #53

Closed
wleoncio opened this issue Jan 24, 2024 · 1 comment
Closed

Extract plot method #53

wleoncio opened this issue Jan 24, 2024 · 1 comment
Labels
minor feature Implementing this should not break backwards compatibility

Comments

@wleoncio
Copy link
Member

There is one (and perhaps only one) function, Exact_unconditional_test_2x2(), that contains code for plotting. It's currently hard-coded to not show the plot, so it may be better to separate this code into a plot() method, either for the contingencytables_result class or for a subclass of it. See code below for relevant chunk.

https://github.com/ocbe-uio/contingencytables/blob/6355e889e7c2e2c9550e7e1cb0c6cdbd33a224a2/R/Exact_unconditional_test_2x2.R#L112-L121

@wleoncio wleoncio added the minor feature Implementing this should not break backwards compatibility label Jan 24, 2024
@wleoncio
Copy link
Member Author

There are actually two functions: McNemar_exact_unconditional_test_paired_2x2() also had this, but was removed on 54c2cfe.

wleoncio added a commit that referenced this issue Feb 12, 2024
Currently only works for functions that originally had a plotting function, i.e. `Exact_unconditional_test_2x2()` and `McNemar_exact_unconditional_test_paired_2x2()`
wleoncio added a commit that referenced this issue Feb 12, 2024
Ideally, plotting tests should use `expect_snapshot()`, but that requires testthat 3rd edition, and I don't care about upgrading right now.
wleoncio added a commit that referenced this issue Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor feature Implementing this should not break backwards compatibility
Projects
None yet
Development

No branches or pull requests

1 participant