dealWithDf | R Documentation |
Adapt the genPluscode function to a class object (sf, data.frame), it returns a vector containing the pluscode of the coordinates in the records of the input data frame.
dealWithDf(x, codeLength)
x |
An object of class (sf, data.frame). |
codeLength |
A number. |
A character vector of length nrow(x).
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.