get_clan_status: Get clan membership and status of hyenas at provided dates

View source: R/get_clan_status.R

get_clan_statusR Documentation

Get clan membership and status of hyenas at provided dates

Description

Identifies the clan that a hyena belongs to at a provided date and it's status (i.e., natal or resident) at the provided date. tblClanMembership is used to determine both pieces of information.

Usage

get_clan_status(ids, dates, end.of.data = "2200-01-01")

Arguments

ids

One or more hyena ids.

end.of.data

The date at which upper bounds of intervals with NA as final date are considered to end. You are unlikely to need to provide this.

date

One or more dates. If more than one date, dates must match length of ids. If one date, the date is recycled for each id.

Value

A dataframe with one row per individual in ids, including date for each individual, residence status (e.g., resident, immigrant), and clan membership. If There is no entry for an individual on the given date, NA is returned for clan and status.

Examples

# returns clan membership and status for bsh on Sep 20 1989
get_clan_status('bsh', '1989-09-20')

get_clan_status(c('bsh', 'mrph', 'hel'), c('1989-09-20', '2009-09-20', '2019-09-20'))


MaraHyenaProject/hyenatools documentation built on Jan. 30, 2025, 5:10 p.m.