subset_bfast: Subset a 'bfastSpatial' data frame by location

Description Usage Arguments Details Value Examples

View source: R/subset_bfast.R

Description

This function subsets the data frame generated by bfastSpatial by location.

Usage

1
subset_bfast(bfast_in, template, boundary, inverse = FALSE)

Arguments

bfast_in

A data frame generated by bfastSpatial().

template

A Raster object with the same resolution, extent, and projection as the raster dataset used to generate bfast_in. Alternatively, an XML file generated by create_raster_metadata().

boundary

A SpatialPolygons object used to define the subset.

inverse

A logical indicating if the spatial subset defined by boundary should be inverted to keep records for cells outside of it.

Details

This function is useful because the full data frame may be too large for easy data manipulation. This function may also be used in conjunction with summary_stat for zonal statistics.

Value

A data frame subsetted according to boundary.

Examples

1
2
3
4
## Not run: 
subset_bfast(bf_df, raster(C:/Desktop/MODIS_NDVI.tif), bnd)

## End(Not run)

jnghiem/bfasttools documentation built on Nov. 4, 2019, 3:02 p.m.