Thanks Peter, it's a good solution.
Finding on RSiteSearch I found a similar solution and I wrote a function to
obtain the mode. That function is as follows.
mode <- function(data) {
# Function for mode estimation of a continuous variable
# Kernel density estimation by Ted Harding & Dougla
Oh you are right Peter, thanks
On Fri, Aug 29, 2008 at 8:37 AM, Peter Dalgaard <[EMAIL PROTECTED]>wrote:
> Henrique Dallazuanna wrote:
> > Try:
> >
> > as.numeric(names(which.max(table(x
> >
> > On Fri, Aug 29, 2008 at 3:13 AM, Manuel Ramon <[EMAIL PROTECTED]> wrote:
> >
>
> You missed the wo
Henrique Dallazuanna wrote:
> Try:
>
> as.numeric(names(which.max(table(x
>
> On Fri, Aug 29, 2008 at 3:13 AM, Manuel Ramon <[EMAIL PROTECTED]> wrote:
>
You missed the word "continuous" there...
> x <- rnorm(10)
> table(x)
x
-1.64244637710945 -0.836534097622312 -0.810292826933485 -0.721008
Try:
as.numeric(names(which.max(table(x
On Fri, Aug 29, 2008 at 3:13 AM, Manuel Ramon <[EMAIL PROTECTED]> wrote:
>
> Is there any R funtion that allow the estimation of mode in a continuous
> variable?
> Thank you
> --
> View this message in context:
> http://www.nabble.com/how-to-calculate-
Is there any R funtion that allow the estimation of mode in a continuous
variable?
Thank you
--
View this message in context:
http://www.nabble.com/how-to-calculate-the-mode-of-a-continuous-variable-tp19214243p19214243.html
Sent from the R help mailing list archive at Nabble.com.
__
5 matches
Mail list logo