Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.33.0306231204470.12665-100000@penguin.rand.org>
Date: 2003-06-23T16:05:57Z
From: J.R. Lockwood
Subject: mode of a data set
In-Reply-To: <200306231550.KAA07642@uhddx01.dt.uh.edu>

Dear Erin,
Assuming that by "data set" you mean a vector "v", then

sort(table(v))

will give you what you want.

On Mon, 23 Jun 2003, Erin Hodgess wrote:

> Date: Mon, 23 Jun 2003 10:50:47 -0500 (CDT)
> From: Erin Hodgess <hodgess at uhddx01.dt.uh.edu>
> To: r-help at stat.math.ethz.ch
> Subject: [R] mode of a data set
> 
> Dear R People:
> 
> Is there a function to find the mode of a data set, please?
> 
> This is the mode as in the value(s) which occur most often.
> 
> Thanks so much!
> 
> R for Windows, v 1.7.0
> 
> Sincerely,
> Erin Hodgess
> mailto: hodgess at uhddx.01.dt.uh.edu
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 

J.R. Lockwood
412-683-2300 x4941
lockwood at rand.org
http://www.rand.org/methodology/stat/members/lockwood/