Displaying 1 result from an estimated 1 matches for "cs_faminc".
2011 Apr 06
5
Need a more efficient way to implement this type of logic in R
...quot;,"HHFAMINC")]
for (indx in 1:length(hh.sub$HOUSEID)) {
if ((hh.sub$HHFAMINC[indx] == '01') | (hh.sub$HHFAMINC[indx] == '02')
| (hh.sub$HHFAMINC[indx] == '03') | (hh.sub$HHFAMINC[indx] == '04') |
(hh.sub$HHFAMINC[indx] == '05'))
hh.sub$CS_FAMINC[indx] <- 1 # Less than $25,000
if ((hh.sub$HHFAMINC[indx] == '06') | (hh.sub$HHFAMINC[indx] == '07')
| (hh.sub$HHFAMINC[indx] == '08') | (hh.sub$HHFAMINC[indx] == '09') |
(hh.sub$HHFAMINC[indx] == '10'))
hh.sub$CS_FAMINC[indx] <- 2 # $25,000 t...