Repository navigation
Return columns winsorize() can't handle unchanged - #753
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified, and the change includes targeted regression coverage for preserving unsupported columns and suppressing messages.
No open issues 🎉
1 file not reviewed
man/winsorize.Rd: Generated file
What changed in this PR
This PR fixes winsorize() for data frames containing unsupported column classes by preserving those columns unchanged instead of failing S3 dispatch.
Changes:
- Added
winsorize.default()with optional, column-aware messaging andverbose = FALSEsupport. - Added regression coverage for unsupported
Datecolumns and silent mode. - Updated documentation, namespace registration, and release notes.
| File | Description |
|---|---|
| tests/testthat/test-winsorization.R | Adds regression tests confirming unsupported Date columns remain unchanged and messages can be suppressed. |
| R/winsorize.R | Adds the default fallback method and passes data-frame column names for informative messages. |
| NEWS.md | Documents the bug fix for unsupported column classes. |
| NAMESPACE | Registers winsorize.default() as an S3 method. |
| man/winsorize.Rd | Updates the generated documentation to describe unchanged handling of unsupported variables. |
Review effort: Lite
jmgirard
force-pushed
the
hotfix-winsorize-default
branch
from
November 26, 2026 00:40
a1c457d to
f6cf6b2
Compare
strengejacke
approved these changes
Nov 26, 2026
# Conflicts: # NEWS.md
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.
winsorize()on a data frame failed with "no applicable method" whenever a column had a class without a method, such asDate,POSIXct, orhaven_labelled:Since
winsorize.data.frame()has noselectargument, the only way around it was to drop those columns first.This adds
winsorize.default(), which returns the column unchanged with a message, likecenter.default()andrescale.default(). The message names the column when it comes from a data frame, andverbose = FALSEsilences it.