vgrabovets
10/20/2016 - 9:32 AM

getMode

getMode

getMode <- function(v) {
     uniqv <- unique(v)
     uniqv[which.max(tabulate(match(v, uniqv)))]
}