getters: Access nests, events, detections, and totals

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Access nests, events, detections, abundance, and density from simulation objects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
get_nests(x, ...)
## S3 method for class 'bsims_population'
get_nests(x, ...)

get_events(x, ...)
## S3 method for class 'bsims_events'
get_events(x, ...)

get_detections(x, ...)
## S3 method for class 'bsims_detections'
get_detections(x, ...)

get_abundance(x, ...)
## S3 method for class 'bsims_population'
get_abundance(x, ...)

get_density(x, ...)
## S3 method for class 'bsims_population'
get_density(x, ...)

get_table(x, ...)
## S3 method for class 'bsims_transcript'
get_table(x,
  type = c("removal", "visits"), ...)

Arguments

x

simulation object.

type

character, the type of table to return: "removal" includes only new individuals as time progresses, "visits" counts individuals in each time interval independent of each other.

...

other arguments passed to internal functions.

Details

get_nests extracts the next locations.

get_events extracts the events.

get_detections extracts the detections.

get_abundance gets the realized total abundance (N), get_density gets the realized average density (abundance/area: N/A).

get_table returns the removal or visits table.

Value

get_abundance and get_density returns a non-negative numeric value.

get_nests returns a data frame with the following columns: i individual identifier, s spatial stratum (H: habitat, E: edge, R: road) x and y are coordinates of the nest locations, g is behavioral (mixture) group or NA.

get_events returns a data frame with the following columns: x and y are locations of the individual at the time of the event, t time of the event within the duration interval, v indicator variable for vocal (1) vs. movement (0) event, i individual identifier.

get_detections returns a data frame with the following columns: x and y are locations of the individual at the time of the event, t time of the event within the duration interval, v indicator variable for vocal (1) vs. movement (0) event, d distance from observer when detected (otherwise NA). i individual identifier, j perceived individual identifier.

get_table returns a matrix with distance bands as rows and time intervals as columns. The cell values are counts if the individuals detected in a removal fashion (only new individuals counter over the time periods) or in a multiple-visits fashion (counting of individuals restarts in every time interval).

Author(s)

Peter Solymos

See Also

bsims_init

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
phi <- 0.5                 # singing rate
tau <- 1:3                 # EDR by strata
dur <- 10                  # simulation duration
tbr <- c(3, 5, 10)         # time intervals
rbr <- c(0.5, 1, 1.5, Inf) # counting radii

l <- bsims_init(10, 0.5, 1)# landscape
p <- bsims_populate(l, 1)  # population
e <- bsims_animate(p,      # events
  vocal_rate=phi, duration=dur)
d <- bsims_detect(e,       # detections
  tau=tau)
x <- bsims_transcribe(d,   # transcription
  tint=tbr, rint=rbr)

## next locations
head(get_nests(p))
head(get_nests(e))
head(get_nests(d))
head(get_nests(x))

## abundance
get_abundance(p)
get_abundance(e)
get_abundance(d)
get_abundance(x)

## density
get_density(p)
get_density(e)
get_density(d)
get_density(x)

## events
head(get_events(e))
head(get_events(d))
head(get_events(x))

## detections
head(get_detections(d))
head(get_detections(x))

get_table(x, "removal")
get_table(x, "visits")

bSims documentation built on Dec. 20, 2019, 5:08 p.m.