R/Mode.R

Mode <-
function(x){    
    counts <- tabulate(match(x, unique(x)))    
    list(Values = unique(x)[counts == max(counts)], Frequency = max(counts))
}

Try the cumstats package in your browser

Any scripts or data that you put into this service are public.

cumstats documentation built on May 2, 2019, 3:04 a.m.