Skip to content

columnFormula: accept encoded column names in the missing-column check - #228

Merged
JorisGoosen merged 1 commit into
masterfrom
fix/columnformula-encoded-names
Oct 30, 2026
Merged

JorisGoosen merged 1 commit into
masterfrom
fix/columnformula-encoded-names

Conversation

@FBartos

@FBartos FBartos commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

In the R Commander names(data) / colnames(data) gives the encoded column names. Those are valid columns, but the missing-column check in columnFormula() only tried to encode each name, so

measurements <- colnames(data)[5:7]
lapply(measurements, columnFormula)

warned No column named "3 - Average RSSI" in the dataset. for every column (the desktop decodes the message, so it names a column that does exist).

The check now also accepts names that .decodeColNamesStrict() resolves to a column. A test with a stub decoder covers both an encoded existing column (no warning) and an encoded-looking unknown name (still warns).

Found while fixing the R Commander batchAnalysis() crash in jasp-desktop (companion PR on the enterprise branch, which bumps the submodule to this commit). On Windows that check is also what crashed the engine; the crash itself is fixed in jasp-desktop.

Tests: tests/testthat/test-columnFormula.R: 13 pass, 0 fail.

🤖 Generated with Claude Code

In the R Commander names(data) gives the encoded column names, which are
valid columns, but the check only tried to encode each name and so warned
"No column named ..." for every one of them (shown decoded, so for a column
that does exist). Also accept names that decode to a column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JorisGoosen
JorisGoosen merged commit f9d0970 into master Oct 30, 2026
19 of 21 checks passed
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