For instance, 1 means the respondent watches 1 hour of tv per day. There are no categories or cutoff labels/values where each respondent falls into. I have datasets with 20 variables, I want 5 of these variables to be on the rows and 15 to. As it stands now, the tvhours variable just takes on the number of hours per day a respondent watches tv. Can I change this Is it possible to recode blank cells SPSS. # "male" "male" "female" "female" "male" "female" "male"ģ) car::recode There is a recode function in the car package (and also a slightly different one in the dplyr package and likely others in other packages). We are now going to do a similar thing in SPSS. # male male female female male female maleĢ) subscripting This creates a character vector income2 <- c("male", "male", "female", "female") Income2 <- factor(income, levels = 1:4, labels = c("male", "male", "female", "female")) as.character(income2) can be used if you want a character vector instead. If there are numerous variables to be recoded in the same way. Assuming you have a numeric vector containing numbers from the set 1, 2, 3, 4 and you want to replace 1 and 2 with "male" and 3 and 4 with "female" then here are some alternatives.ġ) factor This creates such a factor. with small frequencies and re-run the analysis if SPSS says that over 20 of cells are.