mean() — The average

The average — what everyone gets if you share it out evenly.

mean(x)

Key idea

Definition

each value
how many values
the result — the average (balance point)
add them all up

Where you'd use it

Frequently asked questions

Why is my mean NA?
A missing value makes it NA. Use mean(x, na.rm = TRUE) to ignore them.
Mean or median?
For skewed data or outliers, the median is usually more representative.