You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Active geometry gets set to 'geometry' when it should remain as 'centroid' after being set with st_sf().
library("rnaturalearth")
library("rnaturalearthdata")
library(tibble)
library(dplyr)
#> #> Attaching package: 'dplyr'#> The following objects are masked from 'package:stats':#> #> filter, lag#> The following objects are masked from 'package:base':#> #> intersect, setdiff, setequal, union
library(sf)
#> Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1world<- ne_countries(scale="medium", returnclass="sf")
world %>%
st_transform(3857) %>%
mutate(centroid= st_centroid(geometry)) %>%
st_sf(sf_column_name="centroid") %>%
rename(position=centroid) %>%
attr("sf_column")
#> [1] "geometry"## should be "centroid"
dplyr
1.0.0 andsf
0.9-4.Active geometry gets set to 'geometry' when it should remain as 'centroid' after being set with
st_sf()
.Created on 2020-06-22 by the reprex package (v0.3.0)
Session info
The text was updated successfully, but these errors were encountered: