tte_calc_toevent: Calculate time-to-event

Description Usage Arguments Value Examples

View source: R/tte_calc_toevent.R

Description

Calculate time-to-event

Usage

1
tte_calc_toevent(df, effort, samp_per)

Arguments

df

df object

effort

effort from effort_fn()

samp_per

sampling period length. The mean length of time for an animal to pass through a camera viewshed

Value

a dataframe with the same rows as occ, with a TTE column

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
df <- data.frame(
  cam = c(1,1,2,2,2),
  datetime = as.POSIXct(c("2016-01-02 12:00:00",
                        "2016-01-03 13:12:00",
                        "2016-01-02 12:00:00",
                        "2016-01-02 14:00:00",
                        "2016-01-03 16:53:42"),
                      tz = "GMT"),
  count = c(1, 0, 2, 1, 2)
)
eff <- effort_fn(deploy, occ)
tte_calc_toevent(df, eff)

annam21/spaceNtime documentation built on Dec. 12, 2021, 2:48 a.m.