>> Also see addNA. Works great. Sometimes R drives me crazy, but Hadley, you make it much easier for me....
> That is nice. The addNA function does not exactly jump off the page for the > (too) casual reader. In the context of the OP's original problem, these > lines of code are illustrative: Here is an example from the actual dataset: > xtabs(pwgtp~addNA(cut(pums.mex$JWMNP, c(0, 19, 65, Inf), > include.lowest=TRUE))) addNA(cut(pums.mex$JWMNP, c(0, 19, 65, Inf), include.lowest = TRUE)) [0,19] (19,65] (65,Inf] <NA> 39053 46787 2521 61914 > xtabs(pwgtp~(cut(pums.mex$JWMNP, c(0, 19, 65, Inf), include.lowest=TRUE))) cut(pums.mex$JWMNP, c(0, 19, 65, Inf), include.lowest = TRUE) [0,19] (19,65] (65,Inf] 39053 46787 2521 Thanks to all! ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.