R users, I am trying to find some way to find the value of a column that is repeated the most for each StandID of a dataframe. I have research methods online and the help page, but have had no success in finding a solution. I have tried using the table function but it returns items for the whole dataset and not by the StandID. Any help will be appreciated. Thanks in advance.
R version 2.11.1 Windows 7 Dataframe is imported from text file StandID PlotNum HerbNum Woody 001 1 1 low 001 2 2 medium 001 3 1 low 001 4 3 low 001 5 1 high 001 6 2 medium 002 1 1 high 002 2 2 high 002 3 2 low 002 4 3 high 002 5 1 high 002 6 2 medium I would like to get the following from the dataframe StandID HerbNum Woody 001 1 low 002 2 high Thanks, Randy [[alternative HTML version deleted]] ______________________________________________ R-help@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.