[R] Creating a vector of categories

Sharpie chuck at sharpsteen.net
Fri Mar 26 12:44:02 CET 2010



Sharpie wrote:
> 
>   testData$bin <- cut( testData$count, binBreaks, include.lowest = TRUE )
> 

I also made a slight mistake, you will want to replace inclde.lowest = TRUE
with right = FALSE to the call to cut() to preserve the
greater-than-or-equal boundary at the lower end of each bin.

Sorry if that caused any confusion!

-Charlie

-----
Charlie Sharpsteen
Undergraduate-- Environmental Resources Engineering
Humboldt State University
-- 
View this message in context: http://n4.nabble.com/Creating-a-vector-of-categories-tp1691911p1692030.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list