An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20121102/a642457e/attachment.pl>
Question about cut()
5 messages · Ni, Shenghua, Berend Hasselman, Brian Diggs +2 more
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? Berend
4 days later
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
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
On Nov 6, 2012, at 22:16 , Brian Diggs wrote:
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...
Probably not. There's an original question from December 14, 2010... It's the sort of thing Nabble and similar interfaces tend to generate: Replies to ancient posts without any indication of context. For once, though, it wasn't actually Nabble. Or maybe it just got stuck in the outbox for almost two years...?
Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com