I got a table (of schools) which is made by data about the pupils, type of school etc. plus x- and y-Coordinates. I want to create a Map showing all the schools. But some schools having two or more different schooltypes at the same adress. So the x- and y- are the same and I cant show both at the map because the Markers are at the exact location. Now I want to change the x-coordinate (X_CO) of one of the multiple sets of coordinates a little bit.
My task is to find a way to select one instance of a pair of duplicates and mutate the row "X_CO":
if first (or last) duplicate==TRUE then mutate(dat$X_CO=dat$X_CO+0.00015). Else no changes. And this for every instance of the table.
Ive tried duplicated(dat$X_CO) but this gives me a TRUE to both of the duplicates. Any suggestions would be aprreciated :)
Aucun commentaire:
Enregistrer un commentaire