make_dyads: Aggregate events to a regular time interval

Description Usage Arguments Details Value Author(s)

Description

Aggregates events to a regular time interval

Usage

1
2
3
  make_dyads(edo, scale = NULL,
    unit = c("week", "day", "month", "quarter", "year"),
    monday = TRUE, fun = mean, missing.data = NA)

Arguments

edo

Event data

scale

Name of an eventscale or NULL to create counts

unit

Temporal aggregation unit

monday

Whether weeks start on Monday. If FALSE, they start on Sunday

fun

Aggregation function. Should take a vector and return a scalar

missing.data

What weeks with no data are assigned

Details

In an event data set S, assume that A=length(actors(S)) actors K=length(codes(S)) event codes occur. This function creates A^2 data streams labelled by the combination of source and target actors. If scale is NULL these are K-dimensional time series of event counts. If scale names a scale that has been added to the event data fun is used to aggregate the events falling into each temporal interval. This creates a univariate interval valued time series for each directed dyad.

Value

A list of named dyadic aggregated time series

Author(s)

Will Lowe


events documentation built on May 2, 2019, 4:45 p.m.