[R] Histograms with strings,
Jim Lemon
jim at bitwrit.com.au
Fri Mar 18 10:19:39 CET 2011
On 03/18/2011 09:06 AM, Khanvilkar, Shashank wrote:
> Hello,
> Thanks in advance for any help,
>
> I have read a CSV file in which there is a column for an IP addr as in:
>
> tmpInFile$V2
> [1] "74.125.224.38" "74.125.224.38" "129.46.71.19" "129.46.71.19"
> [5] "129.46.71.19" "129.46.71.19" "129.46.71.19" "129.46.71.19"
> [9] "129.46.71.19" "129.46.71.19" "129.46.71.19" "129.46.71.19"
>
> If I want to find the IP addr that has the highest occurrence (129.46.71.19, in this case), is there a simple way to do this?
>
Hi Shank,
Although there have been a couple of answers involving "table":
library(prettyR)
Mode(tmpInFile$V2)
[1] "129.46.71.19"
Jim
More information about the R-help
mailing list