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

[Bug]: quick / click filtering does not work #2515

Closed
2 of 3 tasks
richlv opened this issue Jan 6, 2024 · 10 comments
Closed
2 of 3 tasks

[Bug]: quick / click filtering does not work #2515

richlv opened this issue Jan 6, 2024 · 10 comments

Comments

@richlv
Copy link

richlv commented Jan 6, 2024

JASP Version

0.18.2

Commit ID

No response

JASP Module

Unrelated

What analysis are you seeing the problem on?

No response

What OS are you seeing the problem on?

macOS Intel

Bug Description

Clicking the quick filter checkmarks...

image

...does not perform any filtering in analysis.

image

Expected Behaviour

Clicking on filter options affects analysis.

Steps to Reproduce

  1. Load any dataset with ordinal or nominal scales.
  2. Deselect some values.
  3. Perform any analysis and observe all values still included.
    ...

Log (if any)

No response

Final Checklist

  • I have included a screenshot showcasing the issue, if possible.
  • I have included a JASP file (zipped) or data file that causes the crash/bug, if applicable.
  • I have accurately described the bug, and steps to reproduce it.
@richlv richlv added the Bug label Jan 6, 2024
Copy link

github-actions bot commented Jan 6, 2024

@richlv, thanks for taking the time to create this issue. If possible (and applicable), please upload to the issue website (#2515) a screenshot showcasing the problem, and/or a compressed (zipped) .jasp file or the data file that causes the issue. If you would prefer not to make your data publicly available, you can send your file(s) directly to us, issues@jasp-stats.org

@boutinb
Copy link
Contributor

boutinb commented Jan 8, 2024

Hi @richlv, that is quite strange because I cannot reproduce this issue. Maybe you could share your data?

@richlv
Copy link
Author

richlv commented Jan 8, 2024

Thank you for looking into this.
I've sent a link to the file to issues@jasp-stats.org .
In that file, I have quick-filtered out one of the "Dzimums" values. Looking at analyses, it all seems to be included.

@richlv
Copy link
Author

richlv commented Jan 8, 2024

Looks like I spotted the crucial condition.
If I add any R filtering (like "!is.na(Laiks)" in the data file), quick filters do not apply at all.

@JorisGoosen
Copy link
Contributor

JorisGoosen commented Jan 8, 2024

You need to combine it with the variable generatedFilter

So something like !is.na(Laiks) & generatedFilter

@richlv
Copy link
Author

richlv commented Jan 8, 2024

Thank you, I sort of assumed that just dumping lines below would work :)

The text says "Add filters using R syntax here, see question mark for help.", but there is no question mark. Does it mean the (i) icon, perhaps?
image

@JorisGoosen
Copy link
Contributor

Haha yeah somebody changed the icon but not the text, ill change it

@JorisGoosen
Copy link
Contributor

well dumping lines below "works" in the sense that it is valid code. But I guess if you dont know R it is hard to understand how it works.

Basically the R script here is ran and then the last line is "returned" as the filter.

So before your change the filter looks like:

generatedFilter <- ***Some code generated by clicking labels and other things***
generatedFilter

Which means it return that generatedFilter.

However if you change that too:

generatedFilter <- ***Some code generated by clicking labels and other things***
generatedFilter
!is.na(Laiks)

It just returns the result from the last line, which is just the rows that are not NA in Laiks.

So doing:

generatedFilter <- ***Some code generated by clicking labels and other things***
generatedFilter & !is.na(Laiks)

is the way because it combines both the "generatedFilter" (which as you can possibly derive from the name is the filter as generated by the GUI of JASP) and the manually entered filter (which is !is.na(Laiks))
Hope this helps make it a bit clearer for you

@richlv
Copy link
Author

richlv commented Jan 8, 2024

Thanks, mentioning the & syntax made it clear immediately.
Would the editable block make sense like so?

# Add filters using R syntax here. By default the non-R filter(s) are passed with generatedFilter.
# To include generated filters, append clauses with "&": generatedFilter & ...
# Click the (i) icon in the lower right corner for further help.
generatedFilter

@JorisGoosen
Copy link
Contributor

Yes it would, Ill make some changes for that and Ill also make sure it becomes translatable. Because currently it is locked to english and it seems more explanation there is helpful

JorisGoosen added a commit to JorisGoosen/jasp-desktop that referenced this issue Jan 8, 2024
…s/jasp-issues#2515 (comment)

ctrl/cmd+enter should run r code
also adds is.na to constructors

just replace the DEFAULT_FILTER define with the correct function calls and see what happens

make filter error show up again...

fix statusbar jasp-stats/INTERNAL-jasp#2462

slightly less computersciency tooltip
JorisGoosen added a commit to JorisGoosen/jasp-desktop that referenced this issue Jan 8, 2024
…s/jasp-issues#2515 (comment)

ctrl/cmd+enter should run r code
also adds is.na to constructors

just replace the DEFAULT_FILTER define with the correct function calls and see what happens

make filter error show up again...

fix statusbar jasp-stats/INTERNAL-jasp#2462

slightly less computersciency tooltip
JorisGoosen added a commit to JorisGoosen/jasp-desktop that referenced this issue Jan 9, 2024
…s/jasp-issues#2515 (comment)

ctrl/cmd+enter should run r code
also adds is.na to constructors

just replace the DEFAULT_FILTER define with the correct function calls and see what happens

make filter error show up again...

fix statusbar jasp-stats/INTERNAL-jasp#2462

slightly less computersciency tooltip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants