Conversation
… avoid NA row names in r-devel Agent-Logs-Url: https://github.com/easystats/report/sessions/aadc7586-e780-4972-8f93-af5a77524513 Co-authored-by: rempsyc <13123390+rempsyc@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix CRAN failures due to row names containing missing values
Hotfix: replace May 4, 2026
datawizard::data_tabulate() to avoid r-devel NA row name error in report_participants()
Member
|
@etiennebacher just alerting you that the CRAN failures in |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hotfixes report_participants() to avoid an r-devel failure triggered by datawizard::data_tabulate() producing <NA> row names that now break as.data.frame(). It keeps the participant-summary output logic the same while switching the country/race tabulation to a simpler base-R path and updates package metadata/docs for the release.
Changes:
- Replaced
datawizard::data_tabulate()with directtable()-based frequency/percentage calculation in the country and race branches of.report_participants(). - Bumped the package version and added a NEWS entry for the r-devel compatibility fix.
- Regenerated/updated related documentation and metadata files.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| R/report.character.R | Formatting-only change to multiline as.report_parameters() call. |
| R/report_participants.R | Core hotfix: rewrites country/race frequency table creation to avoid the r-devel NA row-name failure. |
| NEWS.md | Documents the report_participants() hotfix. |
| man/report.compare.loo.Rd | Regenerated/help-link update for report.compare.loo. |
| man/report-package.Rd | Regenerated package author list. |
| man/reexports.Rd | Regenerated reexports documentation links. |
| DESCRIPTION | Version bump and regenerated roxygen metadata. |
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.
r-devel change r89982 (2026-04-30) makes
as.data.frame.*()error when row names containNA.datawizard::data_tabulate()internally constructs atable()withuseNA = "always", producing<NA>as a level; converting that table to a data frame now aborts on r-devel:Changes
R/report_participants.R: In both thetext_countryandtext_raceblocks of.report_participants(), replacedatawizard::data_tabulate()+as.data.frame()with a directtable()call (defaultexclude = NA) and inline percentage computation. NAs are already replaced with"missing"before the table is built, so output is identical: