[R] Finding Values that Occur Most Often in a Vector

From: Gundala Viswanath <gundalav_at_gmail.com>
Date: Thu, 10 Jul 2008 15:04:25 +0900


Hi,

Is there a way to do it?

For example I have the following vector:

> print(myvector)
> [1] -295.8045 -295.8045 -295.8045 -295.8045 -325.4754 -295.8045 -295.8045
 [8] -295.8045 -413.2099 -295.8045

I want it to return -295.8045, which occur most often.


R-help_at_r-project.org 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. Received on Thu 10 Jul 2008 - 06:13:32 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 10 Jul 2008 - 08:31:47 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive