Adding levels to variables in imported datasets

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
starcrossing
Posts: 7
Joined: Sat Apr 13, 2019 1:34 am

Adding levels to variables in imported datasets

Post by starcrossing »

Hello,
I'm new to jamovi and I tried importing one of my datasets. In the original dataset, some of my variables have missing levels (eg. in the questionnaire I had 3 options, say "bus", "car", "bycicle"...) but nobody choose "bus", so that level doesn't exist in jamovi. Hovewer, I have data for the same questionnaire for a different place (that's why I keep them separate), and in that one some respondents did choose "bus". Is it possible to add the "bus" level to the first dataset, even though that's not used? I couldn't find that option.
Thank you,
Simona
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Adding levels to variables in imported datasets

Post by jonathon »

hi simone,

there's not a super-elegant way to do this, but you can:

1. manually type 'bus' into a cell off the bottom of your existing data set (this will add a new row)
2. select 'retain unused levels' in the variable editor
3. delete the row containing 'bus' (return the data set back to the way it was).

if you don't want to have to do this to every new data set you get, you can save this data set as a template, and then import new data *into* it.

here's some info on templates and importing:

https://www.jamovi.org/user-manual.html#updating-data
https://blog.jamovi.org/2019/03/27/import.html

let us know if you get stuck.

cheers

jonathon
starcrossing
Posts: 7
Joined: Sat Apr 13, 2019 1:34 am

Re: Adding levels to variables in imported datasets

Post by starcrossing »

Thanks, that really helped!
kyna
Posts: 1
Joined: Sun Mar 07, 2021 3:24 am

Re: Adding levels to variables in imported datasets

Post by kyna »

Hello I did the manual way of adding levels. However, the frequency tables that would appear will include a count on the added levels. Is there a way of adding levels with the resulting frequency indicating 0?

i hope i am making sense. ':)

Thanks in advance.
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Adding levels to variables in imported datasets

Post by jonathon »

hey kyna, i'm not sure i understand, but this is an old thread. could you start a new thread?

with thanks
Post Reply