presence_summary: Summarize presence data

Description Usage Arguments Details Value Examples

View source: R/presence_summary.R

Description

Summarize presence data

Usage

1
presence_summary(presence, from = NULL, to = NULL)

Arguments

presence

a data.frame with one date column (needs to be named "Date") and columns for each individual with 0/1 indicating absence/presence of that individual on that date

from

character indicating the beginning of the period to be considered (by default the first date in the Date column)

to

character indicating the end of the period to be considered (by default the last date in the Date column)

Details

If an individual left and/or joined multiple times, this will be indicated by the stint column.

The init column marks those individuals that were present on the beginning of the period considered.

Value

a data.frame with entries for each individual indicating the first and last dates of their stays.

Examples

1
2
3
4
data(advpres)
presence_summary(advpres)

presence_summary(advpres, from = "2010-01-27", to = "2010-02-02")

EloRating documentation built on March 26, 2020, 7:29 p.m.