sp_rbind: Combine rows from GRTS or IRS samples.

View source: R/sp_rbind.R

sp_rbindR Documentation

Combine rows from GRTS or IRS samples.

Description

This function row binds the sites_legacy, sites_base, sites_over, and sites_near objects from a GRTS or IRS sample into a single sf object. This function is most useful when a single sf object that contains all design sites is desired (e.g. writing out a single shapefile using sf::write_sf()).

Usage

sp_rbind(object, siteuse = NULL)

Arguments

object

The design sites (output from grts() or irs()).

siteuse

A character vector of site types to return. Can contain "Legacy" (for legacy sites), "Base" (for base sites), "Over" (for n_over replacement sites), and "Near" (for n_near replacement sites). The default is NULL, which returns all non-NULL output from object$sites_legacy, object$sites_base, object$sites_over, and object$sites_near.

Value

A single sf object containing all requested design sites.

Author(s)

Michael Dumelle Dumelle.Michael@epa.gov

Examples

## Not run: 
sample <- grts(NE_Lakes, 50, n_over = 10)
sample <- sp_rbind(sample)
write_sf(sample, "mypath/sample.shp")

## End(Not run)

spsurvey documentation built on May 31, 2023, 6:25 p.m.