min_hpd_inc_area_df: compute the minimum hpd inclusion area for all the birds in a...

View source: R/assess.R

min_hpd_inc_area_dfR Documentation

compute the minimum hpd inclusion area for all the birds in a rasterStack

Description

This is a convenient wrapper that lets you pass in a data frame of bird names with lats and longs and a rasterStack or rasterBrick and it returns the min hpd inclusion area for each bird in a tbl_df-ed data frame.

Usage

min_hpd_inc_area_df(birds, R)

Arguments

birds

a data frame that minimally has columns Short_Name, lat, and long.

R

a rasterStack or rasterBrick of posteriors that each bird originated from each of the cells. The names of the layers must correspond to the ID column in kbirds.

Value

This returns a list with three components:

  • area the minimum hpd inclusion area as a data frame with columns "Short_Name" and "min_hpd_area"

  • missingFromRastercharacter vector of the names of birds found in birds$Short_Name but not found in the names of R

  • missingFromDF character vector of names in R that are not found in birds$Short_Name.


eriqande/gaiah documentation built on April 30, 2023, 6:31 p.m.