Re: [Rd] Statistical mode

2011-05-27 Thread Arni Magnusson
Thank you, Kevin, for the feedback. 1. The mode is not so interesting for continuous data. I would much rather use something like density(). Absolutely. The help page for statmode() says it is for discrete data, and points to density() for continuous data. 2. Both the iris and barley data

Re: [Rd] Statistical mode

2011-05-27 Thread Kevin Wright
Arni, Here are two examples: R> statmode(iris) Sepal.Length Sepal.Width Petal.Length Petal.Width Species "5" "3""1.4""0.2" "setosa" R> table(iris$Species) setosa versicolor virginica 50 50 50 R> library(lattice) R> statmo

[Rd] Statistical mode

2011-05-26 Thread Arni Magnusson
One descriptive statistic that is conspicuously missing from core R is the statistical mode - the most frequent value in a discrete distribution. I would like to propose adding the attached 'statmode' (or a similar function) to the 'stats' package. Currently, it can be quite cumbersome to cal