Displaying 1 result from an estimated 1 matches for "amodecat".
2011 Feb 19
1
Conditional recoding
...i can use recode please advise on
how to. So i am using an if/else if conditions.
My sample dataset is below along with the code and the warning and results i
get.
TIA
Krishnan
#****Code****
attach(airport_survey)
if(AccessMode == 1 || AccessMode == 8 || AccessMode == 9) {
airport_survey$amodecat <- 1
} else if (AccessMode == 2) {
airport_survey$amodecat <- 2
} else if (AccessMode == 3 & rentalcat == 1 || AccessMode == 4 & rentalcat
== 1) {
airport_survey$amodecat <- 3
} else if (AccessMode == 5) {
airport_survey$amodecat <- 8
} else if (AccessMode...