Skip to content

Support data_summary type in One-Sample t Test#1520

Merged
kei51e merged 3 commits into
masterfrom
fix/issue-36193
Jun 6, 2026
Merged

Support data_summary type in One-Sample t Test#1520
kei51e merged 3 commits into
masterfrom
fix/issue-36193

Conversation

@kei51e

@kei51e kei51e commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

Description

Add tidy(type="data_summary", conf_level=0.95) support to exp_one_sample_t_test, making it consistent with exp_ttest. Returns a one-row summary tibble with Rows, Mean, Conf Low, Conf High, Std Error of Mean, Std Deviation, Minimum, and Maximum. The conf_level parameter 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.

  • Add test cases for this fix/enhancement
  • Pass devtools::check()
  • Pass devtools::test()
  • Test installing from github
  • Tested with Exploratory

kei51e and others added 3 commits June 5, 2026 17:10
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>
@kei51e kei51e requested a review from Copilot June 6, 2026 02:55
@kei51e kei51e changed the title feat(one-sample-t-test): add data_summary type to tidy_rowwise Support data_summary type in One-Sample t Test Jun 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 support type = "data_summary" and added conf_level plumbing.
  • Added Diff Conf Low / Diff Conf High columns to the existing type = "model" tidy output (and updated assertions accordingly).
  • Added new test coverage for type = "data_summary" and tidy_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.

Comment thread R/test_wrapper.R
@kei51e kei51e merged commit 393d8b5 into master Jun 6, 2026
4 checks passed
@kei51e kei51e deleted the fix/issue-36193 branch June 6, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants