In R, mean() and median() are standard functions which do what you\'d expect. mode() tells you the internal storage mode of the objec
mean()
median()
mode()
This hack should work fine. Gives you the value as well as the count of mode:
Mode <- function(x){ a = table(x) # x is a vector return(a[which.max(a)]) }