I am trying to calculate the centroid of a dataframe containing the following long/lat data:
> test_points
Lon Lat
1 6.913 51.131
2 6.900 51.133
3 6.883 51.167
4 6.933 51.167
5 6.941 51.177
6 6.982 51.178
7 7.000 51.200
8 6.861 51.205
9 7.014 51.221
10 8.041 51.750
11 8.000 51.767
12 8.050 51.800
However when I apply the centroid function:
centroid(test_points)
I get the following result:
lon lat
[1,] 10.96005 53.32525
Does anybody have any idea where this goes wrong? Thanks in advance.