library(sf)
coordinates <- data.frame(lon = -6.56718, lat = 52.50145)
geom_df <- st_as_sf(coordinates, coords = c("lon", "lat"), crs = 4326)
dealWithDf(geom_df, 12)
###
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)
dealWithDf(geom_df, 12)
Run the code above in your browser using DataLab