Page 1 of 1
Removing numbers in data
Posted: Sun Mar 07, 2021 4:53 am
by dandak
I need some basic help in jamovi. I have data in a column that has text and numbers (e.g., AZ - 5). I want to remove the hyphen and number in the data and just keep the text. Is there anyway I can do this besides retyping it? Any advice would be appreciated. Thanks!
Re: Removing numbers in data
Posted: Sun Mar 07, 2021 5:29 am
by jonathon
you could compute a new variable and use the SPLIT() function.
SPLIT(variable, ' ', 1)
what this does is splits the values up where spaces occur, so "AZ - 5" becomes "AZ", "-", "5". the third argument (1 in this case) refers to the first of those elements, so we're just left with "AZ".
here's some more details on computed variables:
https://blog.jamovi.org/2017/11/28/jamovi-formulas.html
if you're wanting to transform multiple variables in this way, you may be better off with transformed variables:
https://blog.jamovi.org/2018/10/23/tran ... ables.html

- Screen Shot 2021-03-07 at 16.25.09.png (74.34 KiB) Viewed 4217 times
cheers
jonathon
Re: Removing numbers in data
Posted: Sun Mar 07, 2021 8:46 pm
by dandak
Jonathan -
Thank you so much for your quick help and thorough explanation. It worked!!!
I have one more question - where can I find more posts about manipulating the data and columns? I can't find help on this and this is the part of jamovi I'm struggling with. For example, I also have two combine two columns of data into one. I've Googled this and looked through the information on jamovi but can't find information like that. So, if you have any advice, I'd appreciate it. I'm so grateful already for what you've done.
Amanda
Re: Removing numbers in data
Posted: Sun Mar 07, 2021 9:03 pm
by jonathon
hi amanda,
those two blog posts, and the fx box in jamovi are your main sources of help (you'll notice a small button to the left of the formula box in computed/transformed variables, with a fx on it, if you click that it lists all the functions available).
depending on what you're combining, a formula like:
varNameA + varNameB
may be just what you need.
cheers
jonathon
Re: Removing numbers in data
Posted: Sun Mar 07, 2021 9:18 pm
by dandak
Thanks for the tip about the fx box - wasn't aware of that. I think I'll be good to go from here. Thank you again for your help. I really appreciate it!
Amanda
Re: Removing numbers in data
Posted: Sun Mar 07, 2021 9:20 pm
by jonathon
yeah, it's easy to not notice the fx box ... i've never been able to think of a good way to draw people's attention to it.
cheers
jonathon