calc_selection_weights {ARUtools} | R Documentation |
Calculate Selection Weights
Description
Calculate selection weights for a series of recordings based on the selection
parameters defined by sim_selection_weights()
.
Usage
calc_selection_weights(
meta_sun,
params,
col_site_id = site_id,
col_min = t2sr,
col_day = date
)
Arguments
meta_sun |
(Spatial) Data frame. Recording meta data with time to
sunrise/sunset. Output of |
params |
Named list. Parameters created by |
col_site_id |
Column. Unquoted column containing site strata IDs
(defaults to |
col_min |
Column. Unquoted column containing minutes to sunrise ( |
col_day |
Column. Unquoted column containing dates or day-of-year (doy)
to use (defaults to |
Value
Returns data with appended selection weights columns:
-
psel_by
- The minutes column used -
psel_min
- Probability of selection by time of day (min column) -
psel_doy
- Probability of selection by day of year -
psel
- Probability of selection overall -
psel_scaled
- Probability of selection scaled overall -
psel_std
- Probability of selection standardized within a site -
psel_normalized
- Probability of selection normalized within a site
Examples
s <- clean_site_index(example_sites_clean,
name_date_time = c("date_time_start", "date_time_end")
)
m <- clean_metadata(project_files = example_files) |>
add_sites(s) |>
calc_sun()
params <- sim_selection_weights()
calc_selection_weights(m, params = params)