make_target_date_df: Create a data frame with year-long intervals prior to...

View source: R/biographical-data.R

make_target_date_dfR Documentation

Create a data frame with year-long intervals prior to specific target dates

Description

Create a data frame with year-long intervals prior to specific target dates

Usage

make_target_date_df(target_df, babase, members_l, window_length = 1,
  .by_grp = TRUE, .adults_only = TRUE)

Arguments

target_df

A data frame that includes the columns sname, sex, grp, and date

babase

A DBI connection to the babase database

members_l

A subset of members table produced by the function 'subset_members'

window_length

Length in years of the time window for the social index

.by_grp

Logical indicating whether to separate by group. Default is TRUE

.adults_only

Logical indicating whether to include adults only. Default is TRUE

Value

A tibble with one row per animal (and optionally, per group) and target date, with contextual data


amboseli/ramboseli documentation built on July 3, 2025, 11:45 p.m.