Altogether, the mean, median, and mode are the most popular measures of central tendency. They kind of tell us where the distribution is centered. The following code block shows how to calculate the first two of them:
mean(small_sample, na.rm = T)# outputs [1] 7.546716mean(big_sample, na.rm = T)# outputs [1] 9.97051median(small_sample, na.rm = T)# outputs [1] 8.449614median(big_sample, na.rm = T)# outputs [1] 9.979968
The mean() and median() ...