I'm trying to perform a latent class analysis at the moment on a dataset. Most of the variables in the dataset are coded 1 to 10 on a likert scale e.g. 1 is least and 10 is most. I want to convert these variables so that 1:5 are grouped and labelled as 1 and then 6:10 are grouped and labelled as 2. I'm not sure if there is code that can do this?
I have tried recode(variable$data) but that does not seem to work.
Is there a command that I can use to recode the values?