R/lakeMorphoClass.R

Defines functions lakeMorphoClass

Documented in lakeMorphoClass

#' Function to create a lakeMorpho class - this is input to all other methods
#' 
#' This is a helper function that creates a lakeMorpho class object
#' 
#' @param inLake input lake SpatialPolygons object. Required.
#' @param inElev input elevation model raster object
#' @param inCatch input catchement SpatialPolygons object, can be buffer
#'        around lake
#' @param inLakeDist input euclidean distance raster that measures distance
#'        from shore to any pixel in the lake
#' @param lakeOnEdge Boolean indicating if inCatch (or lake Buffer) extends 
#'        beyond extent of elevation data
#'          
#' @export
#' @return Returns an object of class 'lakeMorpho' 
#' @seealso lakeSurroundTopo    


# May need to be done as a method (i.e. no need to @export) TO DO: Add null place holders for all possible
# lakeMorpho metrics (eg various lines)
lakeMorphoClass <- function(inLake, inElev=NULL, inCatch=NULL, inLakeDist=NULL, lakeOnEdge = F) {
    lmorpho <- list(lake = inLake, elev = inElev, surround = inCatch, lakeDistance = inLakeDist, lakeOnEdge = lakeOnEdge)
    class(lmorpho) <- "lakeMorpho"
    return(lmorpho)
} 

Try the lakemorpho package in your browser

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

lakemorpho documentation built on Sept. 24, 2021, 1:06 a.m.