finding an average of certain number in a sample in r code example Example: find average in r mean(x, trim = 0, na.rm = FALSE, ...)