R/ndvi_function.R

Defines functions calc_ndvi

Documented in calc_ndvi

#' 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)
}
nrvannest/createPackage documentation built on March 19, 2022, 7:15 a.m.