what does 'trim' in the 'mean()' funciton do?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

what does 'trim' in the 'mean()' funciton do?

Allerious
linkedin <- c(16, 10, 8, 30, 18, 44)

avg_sum <- mean(linkedin)
avg_sum_trimmed <- mean(linkedin,trim = 0.2)

avg_sum
[1] 21
> avg_sum_trimmed
[1] 18.5

What is trim doing to get 18.5?