R/get_LAT.R

Defines functions get_LAT

Documented in get_LAT

#' Gets RasterStack's latitude information
#' 
#' This function constructs the input for one of the four dimensions 
#' required by \code{\link[gapfill]{Gapfill}}, namely, \emph{latitude}. 
#' 
#' @param stack RasterStack 
#' 
#' @export
#' 
#' @importFrom raster ymin
#' @importFrom raster ymax
#' @importFrom raster nrow 
#' 
#' @note This function may be useful when employing \code{\link[gapfill]{Gapfill}}
#' independently of the current package.
#' 
#' @seealso \code{\link[igapfill]{get_3Darray}}, \code{\link[igapfill]{get_LON}}
#' 
#' @return Character vector of length equal to \code{nrow(stack)}.
#' 
get_LAT <- function(stack){
  as.character( seq( ymin(stack), ymax(stack), length.out = nrow(stack) ) )
}

Try the igapfill package in your browser

Any scripts or data that you put into this service are public.

igapfill documentation built on June 8, 2025, 10:41 a.m.