calckdpaSurvdat: Prepare the data needed to calculate survivorship for...

View source: R/calckdpaSurvdat.R

calckdpaSurvdatR Documentation

Prepare the data needed to calculate survivorship for presumed alive and known dead animals

Description

Goal of this is to ingest the events data frame and make a survivorship data frame for the known dead, and presumed alive animals. These are easy, because there is no uncertainty around their deaths. The output from this will feed into calcpresdSurvdat() to make one data frame that has survivorship for all three death categories

Usage

calckdpaSurvdat(events)

Arguments

events

a data frame of the last entanglement event for individual whales.

Value

kdpasurvldf a many by 10 stacked data frame containing the information needed to calculate survivorship (Done in another function).

EGNo

Numerical identifier of the individual whale

deathMonth

Integer noting the dtime of the animal, i.e. the median month it was estimated to die in

censored

Logical indicating whether or not the animal was censored at dcut

censMonth

Integer indicating the integer time for dcut

survTime0

Integer noting the length of time between the end of the entanglement window and the dtime

deathMonth0

Integer noting the maximum of survTime0

censMonth0

Integer indicating number of months between the end of the entanglement and the censoring month

Severity

Character describing the severity of the entanglement injury. Ordinal values include: minor, moderate, and severe

gearInj

Integer denoting our numerical representation of the entanglement injury and whether or not the injury includes gear

knownDeath

Logical indicating whether or not the animal is known to have died

Examples

 
## Not run: 
calckdpaSurvdat(events)

## End(Not run)

robschick/tangled documentation built on May 9, 2022, 4:07 p.m.