Displaying 1 result from an estimated 1 matches for "wtrus".
Did you mean:
trus
2008 Oct 01
2
an unsophisticated question about recoding in a data frame with control structure if {}
...As the command in question actually appears:
if (nes2004$Rrace2=='3') {
nes2004$Hethno<-(((nes2004$Hint-nes2004$Wint)+(nes2004$Hint-nes2004$Bint)+(nes2004$Hint-nes2004$Aint)+(nes2004$Hwork-nes2004$Wwork)+(nes2004$Hwork-nes2004$Bwork)+(nes2004$Hwork-nes2004$Awork)+(nes2004$Htrus-nes2004$Wtrus)+(nes2004$Htrus-nes2004$Btrus)+(nes2004$Htrus-nes2004$Atrus))/9) }
The other problem here too, is that each of these variables contain varying counts of NA observations.
I've tried to work around this by using ifelse, and other commands, but I can not figure out where to begin re-thinking h...