get_boundary: get_boundary

Description Usage Arguments Value Examples

Description

get_boundary draws the geographical boundary of a specified region from GADM. It takes in a vector of region name and returns a spatial polygon outlining the region.

Usage

1
get_boundary(region)

Arguments

region

region name stored in a vector (vector length depends on the granularity level of the region, from national level down to county level, i.e. c(“USA”), c(“USA”,“Pennsylvania”), c(“USA ”,“Pennsylvania”, “Allegheny”)), and

Value

a spatial polygon outlining the region

Examples

1
2
3
4
5
6
7
# Plotting the region of Pennsylvania
PA <- get_boundary(c("USA", "Pennsylvania"))
plot(PA)

# Plotting the environment conditions for Pennsylvania
PA_environment_6 <- mask(crop(environment_data[[6]], PA), PA)
plot(PA_environment_6)

elaineliu5/DVM documentation built on May 16, 2019, 2:57 a.m.