[R] Question about cut()

David Winsemius dwinsemius at comcast.net
Tue Nov 6 22:24:03 CET 2012


On Nov 2, 2012, at 11:51 AM, Berend Hasselman wrote:

> 
> On 02-11-2012, at 19:11, Ni, Shenghua wrote:
> 
>>> r<-c(1,1,9,1,1,1)
>>> col_no<-cut(r,c(0,2,3,6,8,10,100))
>>> levels(col_no)<-c("<2%","2-4%","4-6%","6-8%","8-10%",">10%")
>>> col_no
>> [1] <2%   <2%   8-10% <2%   <2%   <2%
>> Levels: <2% 2-4% 4-6% 6-8% 8-10% >10%
>> 
> 
> Where is the question?

Back in Dec 14, 2010

https://stat.ethz.ch/pipermail/r-help/2010-December/263076.html

-- 

David Winsemius, MD
Alameda, CA, USA




More information about the R-help mailing list