R/createHabitatType.R

Defines functions createHabitatType

Documented in createHabitatType

#' Process Create Habitat Type Variable
#'
#' @param data
#'
#' @export

createHabitatType <- function(dat) {
	dat %>%
		mutate(
			HabitatType = NA,
			HabitatType = replace(
				HabitatType,
				which(
					Island=="Roadway1" |
					Island=="Roadway2"
				),
				"Barrier Island Habitat"
			),
			HabitatType = replace(
				HabitatType,
				which(
					Island!="Roadway1" &
					Island!="Roadway2"
				),
				"Intracoastal Waterway Island"
			)
		) %>%
		as.data.frame
}
ksauby/GTMNERRproc documentation built on May 20, 2019, 6:42 p.m.