#' Get valid UTM zone from latitude and longitude in WGS84 decimal degrees
#'
#' @param x vector of longitude coordinates in decimal degrees
#' @param y vector of latitude coordinate in decimal degrees
#'
#' @return Vector of UTM zones for each latitude-longitude pair
#'
#' @export
#'
latLong2UTM <- function(x, y) {
unlist(lapply(1:length(x), function(z) {
paste((floor((x[z] + 180) / 6) %% 60) + 1,
ifelse(y[z] < 0, "S", "N"),
sep = "")
}))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.