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

BUG in R-devel for paired/unpaired tests #56

Closed
ddsjoberg opened this issue Feb 20, 2024 · 2 comments · Fixed by #55
Closed

BUG in R-devel for paired/unpaired tests #56

ddsjoberg opened this issue Feb 20, 2024 · 2 comments · Fixed by #55
Labels
ARD bug Something isn't working sme

Comments

@ddsjoberg
Copy link
Collaborator

ddsjoberg commented Feb 20, 2024

What happened?

R-devel has an update where the paired= argument value from the formula method is not passed along to the default method.

For example, we're currently using t.test.formula() for unpaired tests and t.test.default() for paired test. For the unpaired test, we were passing paired= FALSE. But in R-devel the docs have been updated to indicate this arg is not passed to the default method AND (importantly) the function errors if the paired arg is populated with either TRUE or FALSE.

image
version[c("status", "major", "minor")]
#>        _                           
#> status Under development (unstable)
#> major  4                           
#> minor  4.0
t.test(mpg ~ am, data = mtcars, paired = FALSE)
#> Error in t.test.formula(mpg ~ am, data = mtcars, paired = FALSE): cannot use 'paired' in formula method

Created on 2024-02-19 with reprex v2.1.0

We can update this pretty simply with a ... |> utils::modifyList(list(paired = NULL), keep.null = FALSE)

@ddsjoberg ddsjoberg added bug Something isn't working sme ARD labels Feb 20, 2024
@ddsjoberg ddsjoberg mentioned this issue Feb 20, 2024
12 tasks
ddsjoberg added a commit that referenced this issue Feb 20, 2024
**What changes are proposed in this pull request?**
* Style this entry in a way that can be copied directly into `NEWS.md`.
(#<issue number>, @<username>)

Provide more detail here as needed.

**Reference GitHub issue associated with pull request.** _e.g., 'closes
#<issue number>'_
closes #56


--------------------------------------------------------------------------------

Pre-review Checklist (if item does not apply, mark is as complete)
- [ ] **All** GitHub Action workflows pass with a ✅
- [ ] PR branch has pulled the most recent updates from master branch:
`usethis::pr_merge_main()`
- [ ] If a bug was fixed, a unit test was added.
- [ ] Code coverage is suitable for any new functions/features
(generally, 100% coverage for new code): `devtools::test_coverage()`
- [ ] Request a reviewer

Reviewer Checklist (if item does not apply, mark is as complete)

- [ ] If a bug was fixed, a unit test was added.
- [ ] Run `pkgdown::build_site()`. Check the R console for errors, and
review the rendered website.
- [ ] Code coverage is suitable for any new functions/features:
`devtools::test_coverage()`

When the branch is ready to be merged:
- [ ] Update `NEWS.md` with the changes from this pull request under the
heading "`# cards (development version)`". If there is an issue
associated with the pull request, reference it in parentheses at the end
update (see `NEWS.md` for examples).
- [ ] **All** GitHub Action workflows pass with a ✅
- [ ] Approve Pull Request
- [ ] Merge the PR. Please use "Squash and merge" or "Rebase and merge".
@joanbirules
Copy link

Hi,

I am having this problem but the solution here proposed is not working for me; it gives me an error saying "val" is missing. Do you know why this could be or how to solve it?

Thank you very much!!
Joan

"We can update this pretty simply with a ... |> utils::modifyList(list(paired = NULL), keep.null = FALSE)"

Error in modifyList(list(paired = NULL), keep.null = FALSE) :
argument "val" is missing, with no default

@ddsjoberg
Copy link
Collaborator Author

Dear @joanbirules , please open a new issue that includes a minimal reproducible example illustrating your issue (this includes both code and data we can run on our machines). Review https://reprex.tidyverse.org/ and learn how to create the example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARD bug Something isn't working sme
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants