[jaspTTests] Fix y-axis label editing for raincloud plots in Bayesian t-test#380
Open
sisyphus-jasp wants to merge 1 commit intojasp-stats:masterfrom
Open
[jaspTTests] Fix y-axis label editing for raincloud plots in Bayesian t-test#380sisyphus-jasp wants to merge 1 commit intojasp-stats:masterfrom
sisyphus-jasp wants to merge 1 commit intojasp-stats:masterfrom
Conversation
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.
Summary
Fixes: https://github.com/jasp-stats/INTERNAL-jasp/issues/3057
PR Summary
What was wrong (root cause)
When users tried to edit the y-axis title for raincloud plots in Bayesian t-test analyses, JASP threw the error "default method not implemented for type 'list'". This occurred because when JASP passes the edited title back to R, it can sometimes be passed as a list instead of a string, which caused an error in the ggplot2 scale function.
What was changed
Modified
/R/commonTTest.Rin the.descriptivesPlotsRainCloudFillfunction:name = yLabeltoname = if(is.null(yLabel)) NULL else as.character(yLabel)to ensure yLabel is always converted to a character stringWhy this works
The
as.character()function will convert a list to a character string, preventing the "default method not implemented for type 'list'" error. This handles the case where JASP passes the edited title as a list when communicating with the R backend.Test results
All 290 tests pass after the fix.
Implementation Plan
No plan provided by agent.
Fix y-axis label editing for raincloud plots in Bayesian t-test
Screenshot Analysis
screenshot-1.png:
Description of the Screenshot
This screenshot is from the JASP statistical software, showing a bug report related to an error encountered while editing a plot. Below is a detailed breakdown of the image:
1. JASP Module and Analysis
2. Options Selected
3. Output Elements
4. Error Message
5. State of the UI
6. Observations
Transcription of the Error Message
Summary
This screenshot shows a JASP interface where a user is attempting to edit a plot titled "Average Weight Minus the Wrapper." The plot combines a violin plot, boxplot, and scatterplot. An error occurs during the editing process, with the message indicating that the default method for editing plots is not implemented for the type 'list.' The error dialog provides instructions to report the issue to the JASP bug report page. The y-axis is configured to display values from 1000 to 1100 with 20 steps, and the data visualization shows a concentration of points around 1020 with an outlier at 1080.
Final Answer:
\boxed{
\text{Error editing plot}
\text{Unfortunately the plot could not be edited.}
\text{Error message:}
\text{default method not implemented for type 'list'}
\text{If the problem persists, please report the message above at: https://jasp-stats.org/bug-reports}
}
Test Results
Automated Code Review
Approved after 1 review iteration(s).