airdas_effort_sight: Summarize AirDAS sightings by effort segment

View source: R/airdas_effort_sight.R

airdas_effort_sightR Documentation

Summarize AirDAS sightings by effort segment

Description

Summarize number of sightings and animals for selected species by segment

Usage

airdas_effort_sight(x.list, sp.codes, sp.events = c("S", "t"))

Arguments

x.list

list; output of airdas_effort

sp.codes

character; species code(s) to include in segdata. These code(s) will be converted to lower case to match airdas_sight

sp.events

character; event code(s) to include in the sightinfo output. This argument supersedes the 'included' value when determining whether a sighting is included in the segment summaries. Must be one or more of: "S", "t" (case-sensitive). The default is that all of these event codes are kept

Details

This function takes the output of airdas_effort and adds columns for the number of sightings (nSI) and number of animals (ANI) for selected species (selected via sp.codes) for each segment to the segdata element of x.list. However, only sightings with an included value of TRUE (included is a column in sightinfo) are included in the summaries. Having this step separate from airdas_effort allows users to personalize the included values as desired for their analysis.

Value

A list, identical to x.list except for 1) the nSI and ANI columns added to x.list$segdata, one each for each element of sp.codes, and 2) the included column of x.list$sightinfo, which has been set as FALSE for sightings of species not listed in sp.codes

Examples

y <- system.file("airdas_sample.das", package = "swfscAirDAS")
y.proc <- airdas_process(y)
y.cond <- airdas_effort(
  y.proc, method = "condition", conditions = "Bft", seg.min.km = 0.05, 
  num.cores = 1
)

airdas_effort_sight(y.cond, sp.codes = c("mn", "bm"))


swfscAirDAS documentation built on Aug. 9, 2023, 1:06 a.m.