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
Make column names of output of htest-oneway tidier syntactically valid #549
Make column names of output of htest-oneway tidier syntactically valid #549
Conversation
I think this PR solves #500 |
Looks good! Will you
and then I'll merge? |
…md and DESCRIPTION, add comment to document change
@alexpghayes - Let me know if you had something else in mind for tests regarding |
Looks good! Made a small suggestion, but we're close to merging! |
Co-Authored-By: karissawhiting <karissa.whiting@gmail.com>
Co-Authored-By: karissawhiting <karissa.whiting@gmail.com>
Awesome! Thanks for contributing! |
This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue. |
@alexpghayes - In
R/stats-htest-tidiers.R
there is a message indicating that columns will be renamed tonum.df
anddenom.df
if (length(x$parameter) > 1)
isTRUE
, however this renaming doesn't actually occur as far as I can tell (although I may be missing something).Here is the relating section of code in the current version:
I propose the addition of
names(x$parameter) <- make.names(names(x$parameter))
to make these names syntactically valid:This is meant as the first step to fixing the oneway-htest tidier and glance functions (relating to issue #450) so they can pass the strict tests in
tests/testthat/test-stats-htest.R
. The output ofstats::oneway.test
currently hasnum df
anddenom df
as parameters, but these are not in the column glossary.If
denom.df
andnum.df
are added to the column glossary fortidy
andglance
methods after this change, these should pass the strict test (sidenote: thatnum.df
is already in the column glossary for thetidy
method).To finish this strict test issue fix, I propose these follow up steps (after this PR is merged).
column_glossary.rda
file binding the following additions:strict = TRUE
in thecheck_tidy_outputs
andcheck_glance_outputs
functions for the oneway tests oftests/testthat/test-stats-htest.R
.Please let me know if you agree with this plan. Thanks!