On 15/04/2010 08:52, Paul Hiemstra wrote:
[email protected] wrote:
Hello all,

I am using R to perform certain calculations on huge amounts of data.
In short I need a function that does the mode function, ie returns the
most common element. I looked at the mode function in R but it seems
to return the type of the data element you give it. Does such a method
exist? I have tried googling this to no avail as all the results lead
me back to the mode function I do not want.
I googled for "R calculate mode", the first hit was this result:

http://www.mail-archive.com/[email protected]/msg30197.html

But be careful: creating your own function
called 'mode' will mask the standard 'mode'
function.

If you desire to remain sane, name it something
else.

Pat


this is probably what you want.

cheers,
Paul
Thanks,

Don
[[alternative HTML version deleted]]

______________________________________________
[email protected] 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.


--
Patrick Burns
[email protected]
http://www.burns-stat.com
(home of 'Some hints for the R beginner'
and 'The R Inferno')

______________________________________________
[email protected] 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.

Reply via email to