Dear Researchers
I am doing a multinomial logistic regression using the data from the National Survey on Drug Use and Health 2021. I'm a novice with R and I'll probably need to figure out pretty much everything while I'm doing it, so I hope it's okay I'll just post further questions in this topic.
Now I ran into a problem trying to mutate a numeral variable (K6 Scale point, values between 0-24) into 3 different sections. Basically, I want groups that have points between 13-24, between 5-13 and between 0-5.
This is the error message I got:
"Error: '=>' is disabled; set '_R_USE_PIPEBIND_' envvar to a true value to enable it"
I have no idea what this means.
I tried to create the groups like this:
NSDUH_adults %
mutate(high_k6=case_when(K6SCMON>=13~TRUE, K6SCMON=~TRUE, K6SCMON >~FALSE)
(low_k6=case_when(K6SCMON =>5~FALSE))
This works fine with 1 group only but apparently not with 3.
Is there a better way to do it?
Thanks