Skip to content
Prev 13620 / 398502 Next

statistical mode function

Warnes, Gregory R <gregory_r_warnes at groton.pfizer.com> writes:
That's better than:

        as.numeric(names(table(x)[table(x) == max(table(x))])[1])

which I have been using.

Mark

--
Mark Myatt


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._