Computing variables with If-Then

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)
nebojsa
Posts: 5
Joined: Sun Sep 17, 2023 9:01 pm

Re: Computing variables with If-Then

Post by nebojsa »

Sorry for the copy paste mistake "aJnd". This is the correct formula. It is still the same problem:
IF(YEAR==1 and L_CL_CR_R==1, 1, IF(YEAR==3 and L_CL_CR_R==1, 2, IF(YEAR==1 and L_CL_CR_R==2, 3, IF(YEAR==3 and L_CL_CR_R==2, 4, IF(YEAR==1 and L_CL_CR_R==3, 5, IF(YEAR==3 and L_CL_CR_R==3, 6, IF(YEAR==1 and L_CL_CR_R==4, 7, IF(YEAR==3 and L_CL_CR_R==4, 8, 0))
User avatar
jonathon
Posts: 2627
Joined: Fri Jan 27, 2017 10:04 am

Re: Computing variables with If-Then

Post by jonathon »

hi,

please start a new topic next time ... this is an old thread.

you have a lot of opening brackets, but very few closing ones.

jonathon
nebojsa
Posts: 5
Joined: Sun Sep 17, 2023 9:01 pm

Re: Computing variables with If-Then

Post by nebojsa »

Yes, the problem with brackets came to my mind as well. I tried to close all 8, but it didn't work. Maybe I'm missing something?
Post Reply