[R] Question about cut()
Brian Diggs
diggsb at ohsu.edu
Tue Nov 6 22:16:26 CET 2012
On 11/2/2012 11:11 AM, 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%
Yes.
(Or, I get the same output from this code. What is the question?)
> [[alternative HTML version deleted]]
And herein may lie the problem...
--
Brian S. Diggs, PhD
Senior Research Associate, Department of Surgery
Oregon Health & Science University
More information about the R-help
mailing list