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

Better handling of labeleditor for computed columns #5727

Conversation

JorisGoosen
Copy link
Contributor

Now computed columns handle the data they get based on their type, which means that:

  • scale columns assume that the data they get from R (so either an R-column or contstructor column) is the values. If a value already had a label it picks one (but this will usually be 1 ofc)
  • ordinal/nominal assume its labels and thus will use an existing value coupled with that label

If the corresponding value/label is missing it just uses the label/value it got.

This is all made clear to the user by the column in the labeleditor not being editable.
Ive also made sure that you can also filter by clicking labels out. I noticed a small bug where if the computed column is a scale it wont actually filter properly, so ive made sure that each column used in the label-filter-thing (generatedFilter) is always read as nominal and that solves that.

Fixes and or implements https://github.com/jasp-stats/INTERNAL-jasp/issues/2680

There also seemed to be an issue with the autosort but that was easily fixed by just generating Label for each (double-type) label.

@JorisGoosen JorisGoosen requested a review from boutinb November 5, 2024 12:24
JorisGoosen and others added 5 commits November 6, 2024 11:11
if computed column is scale it will interpret values given as values and thus keep labels
otherwise its the opposite

for jasp-stats/INTERNAL-jasp#2680
also make sure that it will update the generated filter for labels after a computed column is updated
and make sure the labelfiltergenerator actually compares with labels (also for scale columns)
@JorisGoosen JorisGoosen force-pushed the computedColumnReadOnlyLevelEditColumns branch from c216ac9 to 42d471e Compare November 6, 2024 10:11
…sorting we should really just replace everything by Label
…reducing code duplication

Also make sure the label isnt overwritten by changing the value in the case of a nonscale computed column
@boutinb boutinb merged commit 5f33df7 into jasp-stats:development Nov 7, 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