quadrats: Gridded survey units

quadratsR Documentation

Gridded survey units

Description

quadrats() generates a regular, rectangular grid of survey units over a frame. transects() is a convenience function for when only a single row of units is desired.

Usage

quadrats(frame, n = NULL, size = NULL, orientation = 0)

transects(frame, n = NULL, size = NULL, orientation = 0)

Arguments

frame

An sf survey frame.

n

Integer of length 1 or 2; number of units to be generated in the x and y directions. See sf::st_make_grid().

size

Target size of the grid (in one dimension). See sf::st_make_grid().

orientation

Integer; the orientation of the grid in degrees. Default: 0.

Value

An sf grid of survey units.

Examples

frame <- rpolygon()

# North-south grid
grid <- quadrats(frame, n = c(10, 10))
plot(grid)

# NE-SW grid
grid <- quadrats(frame, n = c(10, 10), orientation = 45)
plot(grid)

# Fixed size grid
grid <- quadrats(frame, size = 100)
plot(grid)

# Transects
trans <- transects(frame, n = 10)
plot(trans)

# East-west transects
trans <- transects(frame, n = 10, orientation = 90)
plot(trans)

# Fixed size transects
trans <- transects(frame, size = 100)
plot(trans)


joeroe/fieldwalkr documentation built on Feb. 17, 2024, 12:15 a.m.