Hi there, The data is data<-c(2,6,13,26,19,25,18,11,22,25) I want to count data for these rages: [0~10]: [11~20]: [21-30]: Is anyone can help me? Thank you in advance -- View this message in context: http://www.nabble.com/count-data-with-a-specific-range-tp19732290p19732290.html Sent from the R help mailing list archive at Nabble.com.
Kia ora ?hist in particular the breaks argument and set plot=FALSE. HTH ... Peter Alspach> -----Original Message----- > From: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] On Behalf Of sandsky > Sent: Tuesday, 30 September 2008 10:42 a.m. > To: r-help at r-project.org > Subject: [R] count data with a specific range > > > Hi there, > > The data is > > data<-c(2,6,13,26,19,25,18,11,22,25) > > I want to count data for these rages: > > [0~10]: > [11~20]: > [21-30]: > > Is anyone can help me? > > Thank you in advance > -- > View this message in context: > http://www.nabble.com/count-data-with-a-specific-range-tp19732 > 290p19732290.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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. >The contents of this e-mail are privileged and/or confidential to the named recipient and are not to be used by any other person and/or organisation. If you have received this e-mail in error, please notify the sender and delete all material pertaining to this e-mail.
> data<-c(2,6,13,26,19,25,18,11,22,25) > table(cut(data, breaks=c(0,10,20,30)))(0,10] (10,20] (20,30] 2 4 4 On Mon, Sep 29, 2008 at 5:41 PM, sandsky <realstone at hotmail.com> wrote:> > Hi there, > > The data is > > data<-c(2,6,13,26,19,25,18,11,22,25) > > I want to count data for these rages: > > [0~10]: > [11~20]: > [21-30]: > > Is anyone can help me? > > Thank you in advance > -- > View this message in context: http://www.nabble.com/count-data-with-a-specific-range-tp19732290p19732290.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve?
I am converting exact time data to interval data and generate samples via Bootstraping. I had a quite long code to get the frequency but your help makes it simpler. Thank you.. jholtman wrote:> >> data<-c(2,6,13,26,19,25,18,11,22,25) >> table(cut(data, breaks=c(0,10,20,30))) > > (0,10] (10,20] (20,30] > 2 4 4 > > > On Mon, Sep 29, 2008 at 5:41 PM, sandsky <realstone at hotmail.com> wrote: >> >> Hi there, >> >> The data is >> >> data<-c(2,6,13,26,19,25,18,11,22,25) >> >> I want to count data for these rages: >> >> [0~10]: >> [11~20]: >> [21-30]: >> >> Is anyone can help me? >> >> Thank you in advance >> -- >> View this message in context: >> http://www.nabble.com/count-data-with-a-specific-range-tp19732290p19732290.html >> Sent from the R help mailing list archive at Nabble.com. >> >> ______________________________________________ >> R-help at 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. >> > > > > -- > Jim Holtman > Cincinnati, OH > +1 513 646 9390 > > What is the problem that you are trying to solve? > > ______________________________________________ > R-help at 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. > >-- View this message in context: http://www.nabble.com/counting-data-elements-for-a-specific-range-tp19732290p19748345.html Sent from the R help mailing list archive at Nabble.com.
Apparently Analagous Threads
- IWLS vs direct ML estimation
- how to skip a numeric column for averaging other columns?
- calculation for standard normal cumulative distribution
- How to generate a xyplot with multiple panels using an empty data frame ?
- Error: function cannot be evaluated at initial parameters