modalvalue function

Calculate the mode of a vector, array or list.