#' Function to calculate NDVI
#' @param NIR near infra-red satellite band (µm)
#' @param R Red satellite band (µm)
#' @return NDVI (µm)
# Equation
calc_ndvi <- function(NIR, R){
ndvi <- (NIR - R)/(NIR + R)
return(ndvi)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.