Question: how to compute sample mean in r?
Answer: It is calculated by taking the sum of the values and dividing with the number of values in a data series. The function mean() is used to calculate this in R.