Support data_summary type in One-Sample t Test#1520
Merged
Conversation
Adds tidy(type="data_summary", conf_level=0.95) support to exp_one_sample_t_test, returning Rows, Mean, Conf Low/High, Std Error of Mean, Std Deviation, Minimum, and Maximum. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… output Add confidence interval for the difference (mean - mu) to the type="model" output as "Diff Conf Low" and "Diff Conf High", complementing the existing "Difference" column. Callers no longer need to subtract mu themselves. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds tidy(type = "data_summary", conf_level=...) support for exp_one_sample_t_test() results so one-sample t-tests can produce a one-row summary tibble (with mean CI) similar to other test wrappers in the package.
Changes:
- Extended
tidy.one_sample_t_test_exploratory()to supporttype = "data_summary"and addedconf_levelplumbing. - Added
Diff Conf Low/Diff Conf Highcolumns to the existingtype = "model"tidy output (and updated assertions accordingly). - Added new test coverage for
type = "data_summary"andtidy_rowwise(..., type = "data_summary"), and bumped package version/date.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/testthat/test_one_sample_t_test.R |
Updates expected tidy(model) columns and adds tests for type="data_summary" and conf_level. |
R/test_wrapper.R |
Implements tidy(..., type="data_summary") for one-sample t-test results and adds diff-CI columns to type="model". |
DESCRIPTION |
Bumps package version/date for the release containing this feature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add
tidy(type="data_summary", conf_level=0.95)support toexp_one_sample_t_test, making it consistent withexp_ttest. Returns a one-row summary tibble with Rows, Mean, Conf Low, Conf High, Std Error of Mean, Std Deviation, Minimum, and Maximum. Theconf_levelparameter controls the width of the confidence interval using the t-distribution.Checklist
Make sure you have performed the following items before submitting this pull request.
If not, please describe the reason.