Repository navigation
Return a numeric data frame from smoothness() on data frames - #752
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain, and the changes, tests, snapshots, and documentation consistently address the corrected smoothness return type and numeric behavior.
No open issues 🎉
What changed in this PR
This PR fixes smoothness() for data-frame inputs without bootstrapping so it returns a structured numeric data frame consistent with the bootstrapped path and compatible with as.numeric().
Changes:
- Normalize non-bootstrapped smoothness results into a data frame.
- Update tests and snapshots for the new return type and numeric values.
- Document the behavior correction in
NEWS.md.
| File | Description |
|---|---|
| tests/testthat/test-smoothness.R | Updates tests to verify the data-frame output class, parameter names, and numeric smoothness values. |
| tests/testthat/_snaps/smoothness.md | Updates the snapshot from the character matrix output to the numeric data-frame output. |
| R/smoothness.R | Normalizes non-bootstrapped per-column results into data frames before combining them. |
| NEWS.md | Documents the corrected return shape and numeric conversion behavior. |
Review effort: Lite
jmgirard
force-pushed
the
hotfix-smoothness-data-frame
branch
from
November 26, 2026 00:40
76451fd to
c6aabcb
Compare
strengejacke
approved these changes
Nov 26, 2026
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.
Without
iterations,smoothness()on a data frame returned a character matrix, becausecbind()joined theParameternames with the values.as.numeric()on the result then gave the names mixed with the values as text:With
iterations, the same method already returned a data frame withParameter,SmoothnessandSE, andas.numeric.datawizard_smoothness()readsx$Smoothness. This makes the path withoutiterationsreturn the same shape, a data frame withParameterandSmoothness.The
smoothness.mdsnapshot changes from the character matrix to that data frame, with the same values. The class test forsmoothness(BOD)changes frommatrix/arraytodata.frame.