library(sf)
point <- st_sfc(st_point(c(0, 0)))
genPluscode(point,10)
###
coordinates_df <- data.frame(lon = c(-6.56718, -6), lat = c(52.50145, 52))
geom_df <- st_as_sf(coordinates_df, coords = c("lon", "lat"), crs = 4326)
genPluscode(geom_df)
Run the code above in your browser using DataLab