Hello,
After using the sf::st_centroid function point<-st_centroid(map), I get the following output
CODE geometry
1 T1 c(2.3428828903353, 48.8566258524875)
2 T2 c(2.28399910670902, 48.7819047955817)
3 T3 c(2.21992924736305, 48.8189253283551)
4 T4 c(2.21085169860309, 48.8750398323371)
5 T5 c(2.26906485768456, 48.9343606880188)
6 T6 c(2.36329387765033, 48.9356023370997)
7 T7 c(2.50700090863566, 48.9535727259267)
8 T8 c(2.44397382669959, 48.8877991017321)
9 T9 c(2.54231641904574, 48.8827576906768)
10 T10 c(2.48877839063982, 48.8223141349327)
11 T11 c(2.52861726117573, 48.7611485070806)
12 T12 c(2.38244027640969, 48.7476770877747)
I would like a new table that adds two columns X and Y and in the new columns extract the values of c(x,y) that will be distributed in the columns X and Y.
I've tried the following
pts<-point %>%
mutate(Xi=geometry(c[1])) %>%
mutate(Yi=geometry(c[2]))
The error message is : Error in c[1] : objet de type 'builtin' non indiçable
Do you have any idea how I can do that?
Thanks in advance