create_detection_matrix: Create species detection non-detection matrix

Description Usage Arguments Value Examples

Description

Create species detection non-detection matrix

Usage

1
2
create_detection_matrix(uwin_data = NULL, observation_matrix = NULL,
  binomial_detections = FALSE, select_species = TRUE, species = NULL)

Arguments

uwin_data

The list object returned from collect_tables and after it has been through do_qaqc and reduced to the seasons of interest via reduce_seasons.

observation_matrix

The list object returned by create_observation_matrix.

binomial_detections

If TRUE, create_detection_matrix will return the total number of days a species was observed at a site. If FALSE, create_detection_matrix will return a vector of binary elements that take the value of 1 if a species was observed on a given day, 0 if it was not, or NA if the camera was not operable.

select_species

If TRUE, a pop-up list will open up that you can use to select the species you would like to make a detection matrix for. You can hold Ctrl to select multiple species that are seperated by other species you do not want to make a detection matrix for. Defaults to TRUE.

species

A vector of the species names from the ShortName column of the Species table within the UWIN database. If left NULL and select_species = FALSE then a detection matrix will be made for each species in the Species table.

Value

A list with three elements. The first element, mat, contains a survey ID (i.e., site-season-year abbreviation). 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 the total number of days a camera trap was active on a given season.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 # 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)

 # make a detection matrix
 detect_matrix <- create_detection_matrix(dat, obser_matrix, species = "raccoon")

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