Is there the ifelse() function in Jamovi

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
leogerry
Posts: 1
Joined: Thu Jul 20, 2023 4:02 pm

Is there the ifelse() function in Jamovi

Post by leogerry »

Hi,

Am new to Jamovi and wonderfully lost!

Wondering if I can use the following ifelse function in computing an new variable:

NEWVariable = ifelse(p20freekit_circ___1 == 1,1,ifelse(p20freekit_circ___2 == 1,2,ifelse(p20freekit_circ___3 == 1,3,ifelse(p20freekit_circ___4 == 1,4,ifelse(p20freekit_circ___5 == 1,5,0 )))))

This in R as far as I know.

Am wondering how to do it in Jamovi.

Thanks for any hints.

Leo
User avatar
jonathon
Posts: 2627
Joined: Fri Jan 27, 2017 10:04 am

Re: Is there the ifelse() function in Jamovi

Post by jonathon »

use the IF() function

although it looks like you're wanting to recode a variable, i'd suggest using the transformed variables instead:

https://blog.jamovi.org/2018/10/23/tran ... ables.html

jonathon
Post Reply