Displaying 1 result from an estimated 1 matches for "trippurp".
Did you mean:
trippups
2012 Mar 06
1
How to eliminate for next loops in this script
...series of nested for next loops. I know that there must be a better way to
do so, but could use some assistance pointing the way.
Here is my working, but inefficient script:
library(Hmisc)
rm(list=ls())
load('NHTS.Rdata')
day.wt <- day[c("HOUSEID","WTTRDFIN", "TRIPPURP","TRVLCMIN")]
hh.wt <- hh[c("HOUSEID","WTHHFIN","HHSIZE","HHVEHCNT","HOMETYPE")]
hh.wt$HHBIN <- with(hh.wt,{ cut(HHSIZE,
breaks=c(0,1,2,3,4,max(HHSIZE)),labels=c("1","2","3","4","5+&q...