ArmorCode - 1 month ago 9

R Question

I have these data points:

`> a1 = c(2,10)`

> a2 = c(2,5)

> a3 = c(8,4)

And I'd like to find the 2 dimensional mean (edit: Centroid) of those data points with r.

I have tried the following:

`>mean(c(a1,a2,a3))`

but it only gives me a one-dimensional mean value. How can I get the mean of the points?