(y <- 1:4)
#> [1] 1 2 3 4
mean(y)
#> [1] 2.5

Created on 2020-03-30 by the reprex package (v0.3.0)