I'm stuck with a seemingly simple problem. I'd like to manually correct the results of geocoding for selected points. Lets say that the centroid of "Dare" needs to be updated:
library(sf)
nc <- st_centroid(st_read(system.file("shape/nc.shp", package = "sf")))
st_coordinates(filter(nc, NAME== "Dare"))
How could I change original values of
X Y
1 -75.80982 35.73548
Into something different?
I expected something like
st_coordinates(filter(nc, NAME== "Dare")) <- matrix(c(-73, 33), nrow = 1)
Or
nc %>%
mutate(geometry = ifelse(place_full_name == "Dare",
yes = st_set_geometry(c(-73, 33)),
no = geometry))
To do the job but both solutions produce error.