I need to calculate the majority vote for an item in R and I don\'t have a clue how to approach this.
I have a data frame with items and assigned categories. What I
One liner (using plyr):
plyr
ddply(dt, .(item), function(x) which.max(tabulate(x$category)))