Skip to content

Decode embedded column names in analysis results#8

Open
FBartos wants to merge 6 commits into
jasp-stats:masterfrom
FBartos:fix/decode-embedded-result-column-names
Open

Decode embedded column names in analysis results#8
FBartos wants to merge 6 commits into
jasp-stats:masterfrom
FBartos:fix/decode-embedded-result-column-names

Conversation

@FBartos
Copy link
Copy Markdown
Contributor

@FBartos FBartos commented May 26, 2026

What this fixes

decodeAnalysisResults() already decoded result strings when the full string was exactly an encoded JASP column name, such as jaspColumn2 or JaspColumn_1_Encoded.

However, some result payload fields contain encoded column names embedded inside larger strings. In the MixedModels replay path this showed up in the ANOVA summary:

  • main-effect rows decoded correctly because the effect field was a single encoded column token
  • interaction rows were left partially encoded because they were compound strings such as jaspColumn2 ? jaspColumn3
  • footnotes could also remain encoded when they contained quoted column names inside explanatory text

This made the native replay look mostly correct while still leaking bridge/internal column tokens in user-facing result text.

Change

This updates the generic result decoder in jaspSyntax so it also detects encoded column-name tokens inside character strings and replaces only those tokens via the available column mapping/native decoder.

The fix stays at the jaspSyntax::decodeAnalysisResults() boundary instead of adding module-specific decoding logic in jaspTools or jaspMixedModels.

Validation

  • Added regression coverage for embedded column names in interaction-like strings and footnote-like text.
  • Confirmed unmatched tokens are left untouched, e.g. jaspColumn10 is not accidentally rewritten from a shorter mapping.
  • Ran testthat::test_file("tests/testthat/test-dataset-helpers.R") successfully on Windows/R 4.6 with local bridge runtime DLL paths on PATH.
  • Locally replayed the MixedModels "Larks and Owls" example after installing this branch; the ANOVA interaction decoded to Chronotype ? TimeOfDay, the random-effects footnote decoded to Subject, and the ANOVA summary had zero remaining jaspColumn/JaspColumn_ hits.

FBartos and others added 5 commits May 27, 2026 09:12
loadQmlAndParseOptions now calls syntaxBridgeLoadQmlAndParseOptionsStatus,
which returns a JSON status object following the same pattern as other
bridge functions. Errors from the QML form (e.g. unresolved formula terms)
are surfaced via Rcpp::stop instead of being silently swallowed as an
empty return value.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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