I asked why length(byyr$cnd95[byyr$cnd95=="tr"]) was counting NA's as well as "tr"s. Thanks to Brian Ripley, Uwe Ligges, Ott Toomet, Marc Schwartz, and Thomas Lumley for their help.
Two solutions were to replace my call with length[byyr$cnd95 %in% "tr"] or with sum(byyr$cnd95 == "tr", na.rm=TRUE) and there were variations on those themes. Thanks again. Dave ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help