nbtw_seasons {wpeR} | R Documentation |
Number of detected animals between two sampling seasons
Description
Gives an numeric overview of individuals captured within the second sampling season compared tho the first one.
Usage
nbtw_seasons(
animal_id,
capture_date,
season1_start,
season1_end,
season2_start,
season2_end
)
Arguments
animal_id |
A column in the dataframe of all samples that stores individual animal identifier code. |
capture_date |
A column in the dataframe of all samples that stores
the date of sample collection. Must be in |
season1_start |
String in |
season1_end |
String in |
season2_start |
String in |
season2_end |
String in |
Value
A data frame with one row and six columns corresponding to season 1 and 2
start and end dates, number of detected animals in season 2 (total_cap
),
number of new detentions in season 2 (new_captures
), umber of animals from
season 1 detected within season 2 (recaptured
) and number of individuals
skipped in season 2 but detected after the end of that season (skipped
).
Examples
# Calculate the number of animals detected between two sampling seasons.
nbtw_seasons(
animal_id = wolf_samples$AnimalRef,
capture_date = wolf_samples$Date,
season1_start = as.Date("2017-01-01"),
season1_end = as.Date("2017-12-31"),
season2_start = as.Date("2018-01-01"),
season2_end = as.Date("2018-12-31")
)