Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of variables should be kept in formula #5733

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

boutinb
Copy link
Contributor

@boutinb boutinb commented Nov 12, 2024

Fixes https://github.com/jasp-stats/INTERNAL-jasp/issues/2689

This issue is reproduceable with Variables list with interactions: in ANOVA or MIxed Models for example.

Also in the Mixed Models, if several random effects are added, some effects are sometimes suddenly added or removed when applying the R Syntax. This was due to the fact that the controls dynamically created by the ComponentsList were not removed before setting the new options.

At last, avoid generating R Syntax during the initialization of the form: each time a control gets a new value, the R Syntax is generated: this is not needed when the form is being initialized.

Fixes jasp-stats/INTERNAL-jasp#2689

Also in the Mixed Models, if several random effects are added, some effects are sometimes suddenly added or removed when applying the R Syntax. This was due to the fact that the controls dynamically created by the ComponentsList were not removed before setting the new options.
At last, avoid generating R Syntax during the initialization of the form: each time a control gets a new value, the R Syntax is generated: this is not needed when the form is being initialized.
if (termsToAdd.contains(term))
{
if (!first) result += " + ";
result += FormulaParser::transformToFormulaTerm(term, termsToAdd[term], FormulaParser::interactionSeparator);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lazy solution :p

@JorisGoosen JorisGoosen merged commit d4810ee into jasp-stats:development Nov 14, 2024
1 check 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