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

add ard_aov and ard_onewaytest #44

Merged
merged 41 commits into from
Apr 5, 2024
Merged

add ard_aov and ard_onewaytest #44

merged 41 commits into from
Apr 5, 2024

Conversation

ayogasekaram
Copy link
Contributor

@ayogasekaram ayogasekaram commented Feb 7, 2024

add ard_aov and ard_onewaytest functions to cardx

closes #35


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

  • Ensure all package dependencies are installed: devtools::install_dev_deps()
  • 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.
  • 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()
  • usethis::use_spell_check() runs with no spelling errors in documentation

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).
  • Increment the version number using usethis::use_version(which = "dev")
  • Run usethis::use_spell_check() again
  • Approve Pull Request
  • Merge the PR. Please use "Squash and merge".

Copy link
Contributor

github-actions bot commented Feb 7, 2024

badge

Code Coverage Summary

Filename                    Stmts    Miss  Cover    Missing
------------------------  -------  ------  -------  ------------------------------------
R/ard_aov.R                    35       0  100.00%
R/ard_car_anova.R              41       2  95.12%   57, 60
R/ard_chisqtest.R              38       1  97.37%   37
R/ard_cohens_d.R               87       2  97.70%   64, 107
R/ard_fishertest.R             40       1  97.50%   37
R/ard_hedges_g.R               81       2  97.53%   63, 112
R/ard_kruskaltest.R            34       1  97.06%   36
R/ard_mcnemartest.R            48       1  97.92%   41
R/ard_moodtest.R               47       1  97.87%   44
R/ard_onewaytest.R             30       0  100.00%
R/ard_proportion_ci.R          40       5  87.50%   63-67
R/ard_proptest.R               78       1  98.72%   36
R/ard_regression_basic.R       14       1  92.86%   44
R/ard_regression.R             49       0  100.00%
R/ard_smd.R                    54       1  98.15%   46
R/ard_survfit.R               173       4  97.69%   74, 78, 88, 238
R/ard_svychisq.R               36       1  97.22%   42
R/ard_svycontinuous.R         192       2  98.96%   166, 176
R/ard_svyranktest.R            50       0  100.00%
R/ard_svyttest.R               49       0  100.00%
R/ard_ttest.R                  96       2  97.92%   60, 104
R/ard_vif.R                    58       2  96.55%   46, 80
R/ard_wilcoxtest.R            105       2  98.10%   60, 110
R/proportion_ci.R             188      28  85.11%   275, 278, 287-292, 300, 315, 415-438
TOTAL                        1663      60  96.39%

Diff against main

Filename              Stmts    Miss  Cover
------------------  -------  ------  --------
R/ard_aov.R             +35       0  +100.00%
R/ard_onewaytest.R      +30       0  +100.00%
TOTAL                   +65       0  +0.15%

Results for commit: 9af5439

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented Feb 7, 2024

Unit Tests Summary

  1 files   53 suites   7s ⏱️
 52 tests  33 ✅ 19 💤 0 ❌
141 runs  107 ✅ 34 💤 0 ❌

Results for commit 9af5439.

♻️ This comment has been updated with latest results.

@ayogasekaram ayogasekaram marked this pull request as draft February 7, 2024 16:50
- add tests
- rename anova file to aov
@ayogasekaram ayogasekaram marked this pull request as ready for review February 7, 2024 19:31
Copy link
Contributor

github-actions bot commented Feb 7, 2024

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
ard_aov 👶 $+1.76$ $+3$ $+1$ $0$ $0$
ard_onewaytest 👶 $+0.09$ $+3$ $+1$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
ard_aov 👶 $+1.76$ ard_aov_works
ard_onewaytest 👶 $+0.09$ ard_onewaytest_works

Results for commit 9f86cb4

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@ddsjoberg ddsjoberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!! I made some initial comments, but it's getting late and i am logging off.

R/ard_aov.R Outdated Show resolved Hide resolved
R/ard_aov.R Outdated Show resolved Hide resolved
R/ard_aov.R Outdated Show resolved Hide resolved
R/ard_aov.R Outdated Show resolved Hide resolved
R/ard_onewaytest.R Outdated Show resolved Hide resolved
R/ard_onewaytest.R Outdated Show resolved Hide resolved
tests/testthat/test-ard_aov.R Outdated Show resolved Hide resolved
tests/testthat/_snaps/ard_aov.md Show resolved Hide resolved
ddsjoberg and others added 3 commits February 8, 2024 17:48
- Remove unnecessary function args to record.
- subset columns in tests snaps for readability
- more informative comment in test file.
R/ard_aov.R Outdated Show resolved Hide resolved
@ddsjoberg
Copy link
Collaborator

on hold until #46 is complete

@ddsjoberg
Copy link
Collaborator

Waiting on ard_regression_basic() #46

@codecov-commenter
Copy link

codecov-commenter commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.72%. Comparing base (ade0c33) to head (dc71487).
Report is 1 commits behind head on main.

❗ Current head dc71487 differs from pull request most recent head 0bbad53. Consider uploading reports for the commit 0bbad53 to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #44      +/-   ##
==========================================
+ Coverage   99.69%   99.72%   +0.02%     
==========================================
  Files          13       15       +2     
  Lines         663      722      +59     
==========================================
+ Hits          661      720      +59     
  Misses          2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ayogasekaram
Copy link
Contributor Author

hey @ddsjoberg! The functions have been reworked to accept the regression model at input. Let me know if there's anything else to change :)

@ddsjoberg
Copy link
Collaborator

thank you for the updates @ayogasekaram !! I think we had a slight miscommunication. Rather than passing a full regression model, these functions should accept a formula and data frame (like the underlying functions themselves). It doesn't look like that will be a big update 🤞🏼🤞🏼🤞🏼

@ayogasekaram
Copy link
Contributor Author

@ddsjoberg updates should be good to go! let me know if there's anything else :)

@ddsjoberg
Copy link
Collaborator

Thank you @ayogasekaram !!! I made a few small edits

  • Add this to the ard_aov() roxygen comments @examplesIf cards::is_pkg_installed(c("broom.helpers"), reference_pkg = "cardx")
  • Add this to the ard_onewaytest() roxygen comments @examplesIf cards::is_pkg_installed(c("broom"), reference_pkg = "cardx")
  • We had a check that broom.helpers was installed for ard_onewaytest(), but I think we only need broom so I updated that.
  • Added styler: off to this line so it doesn't get styled into something silly {structure(., class = c("card", class(.)))} # styler: off
  • Added this to top of the unit testing files: skip_if_not(cards::is_pkg_installed("broom", reference_pkg = "cardx"))

Copy link
Collaborator

@ddsjoberg ddsjoberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for these additions @ayogasekaram !!!

@ddsjoberg ddsjoberg enabled auto-merge (squash) April 4, 2024 23:58
@ddsjoberg ddsjoberg merged commit ab0ca35 into main Apr 5, 2024
28 checks passed
@ddsjoberg ddsjoberg deleted the ard_anova branch April 5, 2024 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ARD for One-way ANOVA (aov() and oneway.test())
3 participants