else='copy'
else='NA'
NA
.else='Other'
varout
determines whether a new variable with the recoded values should appended at the end of the dataset.
data(fromXPSS)
fromXPSS <- xpssRecode(fromXPSS,
variables ="V1",
rec="'Audi' = 'Porsche'; else= copy",
varout = NULL)
fromXPSS <- xpssRecode(fromXPSS,
variables = c("V5","V7_2"),
rec = "lo:50 =1; 51:200=2; 201:hi=3; else = copy",
varout =c("V5_new","V7_new"))
fromXPSS <- xpssRecode(fromXPSS,
variables = c("V6_kl3","V7_2"),
rec = "sysmis = 99",
varout =c("V6_new","V7_new"))
Run the code above in your browser using DataLab