Description Usage Arguments Details Value Author(s) Examples
Format data
1 2 3 4 |
data |
Original point count dataframe with individual species detections and distances in each row; ok to contain multiple species at this stage |
strata |
Column name in |
year |
Optional, defaults to |
strata.area |
Default of 1 produces estimates of the number of individuals per hectare; change to name of column representing actual area of each stratum (in hectares) to instead extrapolate densities and estimate total number of individuals |
sample |
Column name in |
visitnum |
Column name in |
weights |
Optional, defaults to |
species |
Column name in |
count |
Column name in |
dist |
Column name in |
dist_bin_id |
Defaults to 'Distance.Bin.ID'; currently only partially supported for protocol VCP25 |
flyover |
Optional, defaults to |
protocol |
Column name in |
This function is the first step in conducting a distance analysis, formatting point count data into the data structure with column names required by the package Distance
.
Default values are intended for work with California Avian Data Center (CADC) outputs, using column names produced by downloading data in "Project Lead" mode, but should be adaptable to other formats.
Effort is calculated as the number of unique values in visitnum
for each strata
and optionally year
. Effort may be further weighted by values in weights
. For error checking, the function will print the total number of unique strata and sampling locations identified, as well as the range of the number of visits to each sampling location.
The function requires providing either dist
, a numeric column with detection distances (which may represent the midpoint of distance bins), or dist_bin_id
. If only dist_bin_id
is provided, the function will attempt to translate the standard bin IDs provided by CADC to the corresponding numeric midpoint values for the protocol VCP25 only. For all other protocols, the function currently produces an error. All distances are assumed to be in meters and strata area in hectares.
Any values in flyover
other than ”, ' ', or NA
are assumed to flag birds flying over a sampling location (but not using the sampling location), and will be removed.
Returns a data frame including columns required by package Distance
, including: Region.Label
, Area
, Sample.Label
, Effort
, and distance
.
Also returns species
, count
, protocol
, and any other unused columns remaining in original data.
Kristen Dybala, kdybala@pointblue.org
1 | ## Not run: fdat = format.data(data=dat, strata='group')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.