For calculation of mean and median we have built-in functions in R.
But for mode calculations we do not have any built-in function.
I had googled and found a piece of code ( code attached below) that can be used to find mode, however, it has a lot of limitations. does anyone know any other easier way to calculate mode in R? like a packadge installation.
I am trying to find the mode in R for a homework assignment (ISyE 412). By inspection, I see that the data in the vector is trimodal. This data vector is small. I tried the above suggested method from the post as well as the website https://www.tutorialspoint.com/r/r_mean_median_mode.htm. This yielded only one answer.
My question is: how do we get bimodal and trimodal results when using R? With very large data sets, the above method may be problematic.