create_observation_matrix: The number of days each camera trap is operable per season

Description Usage Arguments Value Examples

Description

The number of days each camera trap is operable per season

Usage

1
create_observation_matrix(uwin_data = NULL, drop_tails = FALSE)

Arguments

uwin_data

The list object returned from collect_tables and after it has been through do_qaqc . If the Visits table is not within this object an error will occur.

drop_tails

This will check if the date range for a site taken from the camera trap images occurs between when the camera set date and camera pull date entered into the Visits table of the UWIN database. If the date range is > 7 days before the first recorded camera set for a sampling season or > 7 days after the last recorded camera pull for a sampling season then those days will be removed from the analysis.

Value

A list with 3 elements. The first element, mat, contains either a survey ID (i.e., site-season-year abbrevaition) by date matrix if binomial_detections = FALSE or a named vector of the number of days each survey ID was active. The second element, days_active, is a vector of the days that camera traps were active in a given season. The final element, binom_mat, is a binomial version of the mat element (i.e., the rowSums from mat).

Examples

1
2
3
4
5
6
7
8
 # apply qaqc
 dat <- do_qaqc(uwin_test)

 # collect only one season of data
 dat <- reduce_seasons(dat, start = "JU17")

 # make observation matrix
 obser_matrix <- create_observation_matrix(dat)

mfidino/uwinr documentation built on Oct. 9, 2019, 10:02 p.m.