Thanks andrija
I was wondering is there any statistical test that can give me the most
frequent continuous interval range.

Your code will also give discontinuous frequency intervals. For example, In
the code below I dont want the entry with value 400. I am interested more
in the bell shape region.

1> x = c(1,2, rep(4,3), rep(5,6), rep(6,7),rep(7,8), rep(9,7), rep(10,4),
13, 17,17,30,100,300, rep(400,10))
1> barplot(table(x))

I am looking for some test that can give me an out of any of the 4-10,
 5-9, 5-10 etc intervals.

Thanks again.








On Sun, Jan 8, 2012 at 9:37 AM, andrija djurovic <djandrija@gmail.com>wrote:

> Hi. You can do something like this:
> #find the most frequent values of x
> > t <- table(x)
> > t[t==max(t)]
> 5
> 8
> #sort table t based on frequencies
> > t[order(as.numeric(t),decreasing = TRUE)]
> x
>  5   6   4  17   1   2  13  30 100 300
>  8   5   4   2   1   1   1   1   1   1
> #extract any range from sorted table
> > t[order(as.numeric(t),decreasing = TRUE)][1:3]
> x
> 5 6 4
> 8 5 4
>
> I hope this helps.
>
> Andrija
>
>
> On Sun, Jan 8, 2012 at 1:48 PM, Mary Kindall <mary.kindall@gmail.com>
> wrote:
> > In a frequency distribution table (bell shaped), how can we find the most
> > frequent range?
> > for example:
> >
> >  x = c(1,2, 4,4,4,4, 5,5,5,6,6,5,5,5,5,5,6,6,6,13, 17,17,30,100,300)
> >
> > barplot(table(x))
> >
> >
> > In the code above, which function do we use to find that the most
> > frequent value range from 4 to 6.
> >
> > Thanks.
> >
> >
> >
> > --
> > -------------
> > Mary Kindall
> > Yorktown Heights, NY
> > USA
> >
> >        [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help@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.
>



-- 
-------------
Mary Kindall
Yorktown Heights, NY
USA

	[[alternative HTML version deleted]]

