CONTAINS filter

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
kemelzaidan
Posts: 3
Joined: Sat Nov 07, 2020 4:51 pm

CONTAINS filter

Post by kemelzaidan »

I want to do what I believe it should be very easy to do on jamovi, but I'm having a great difficulty. If you can see from the image below, I have a CSV with 3 variables "image_id", "image_name" and "volume_id". What I would like to do is simply filter "image_name" for values which have "Windows" in it (or "W2") in order to count how many of those images are Windows images on the frequency tables on the right.

But I've tried many times getting the right formula on the filter without any success. The error message does make it clear what I'm doing wrong. What would be the right formula to achieve such a result?

Image
sbalci
Posts: 124
Joined: Sat Jan 06, 2018 10:25 pm
Contact:

Re: CONTAINS filter

Post by sbalci »

Hi,
I just learned the answer.

Please try

Code: Select all

= CONTAINS ('W2', image_name)
User avatar
MAgojam
Posts: 421
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

Re: CONTAINS filter

Post by MAgojam »

Hi, @kemelzaidan.

For your filter I suggest you use the CONTAINS() function like so:
CONTAINS ("Windows", "W2", image_name)
Take a look at the screenshot that I am attaching to you.
ScreenShot_20201125.PNG
ScreenShot_20201125.PNG (55.06 KiB) Viewed 2030 times
Remember that it is case sensitive and you can add other substrings before the name of the variable (s) of interest.

Cheers,
Maurizio
kemelzaidan
Posts: 3
Joined: Sat Nov 07, 2020 4:51 pm

Re: CONTAINS filter

Post by kemelzaidan »

It did work. So many thanks. I believe that the hint and error messages just need to be a bit more clear.

Thanks again.
Post Reply