dot: dyadic observation time

View source: R/dot.R

dotR Documentation

dyadic observation time

Description

dyadic observation time

Usage

dot(
  ot.source,
  dyads,
  daterange = NULL,
  presence = NULL,
  ot.style = "table",
  exclcols = NULL
)

Arguments

ot.source

observation time data, for the moment only supported in table form, not yet in party-style. Must contain a "focal" column, a date column, and a observation time column

dyads

a character matrix with four columns, the first two correspond to the individual ids, and the third and fourth are dyadic, first in alphabetical order, second the reversed of that, and in which individuals are separated by "_@_". See makedyads. If only a character vector is used, dyads are generated by makedyads

daterange

character of length 2, with date range...

presence

presence "matrix" (usually a data frame...); see createnullpresence. presence2 is only necessary if focal-nonfocal dyads are to be considered at the same time, e.g. when interested in male-male focal dyads and male-female focal-nonfocal dyads. In this case, presence2 would be the female presence data.

ot.style

character, either "table" (default) or "party", ie. party style...

exclcols

character string with column names (or numerical index of these) to be excluded. Normally used to exclude columns that neither represent IDs, date or focal.

Details

returned are only dyads that were co-resident at least one day and were observed for more than zero minutes/hours (depending on the unit of the OT) MAYBE NOT TRUE ANYMORE???

Value

data.frame

Examples

## Not run: 
data(dataset3)
# limit presence to focals (not yet differentiated between presence and presence2
in the example data sets..)
focalpresence <- dataset3$pres[, c("date", "m", "g", "y")]
dot(daterange = c("2000-01-11", "2000-04-01"), OT = dataset3$ot, presence = dataset3$presence)
dot(daterange = c("2000-01-11", "2000-04-01"), OT = dataset3$ot, presence = NULL)

## End(Not run)

gobbios/socialindices documentation built on Feb. 14, 2023, 3:56 p.m.