filter_actors: Filter out events that do not involve specified actors

Description Usage Arguments Details Value Author(s) See Also

View source: R/events.R

Description

Filters out events that do not involve specified actors

Usage

1
2
filter_actors(edo, fun = function(x) {     TRUE }, which = c("both",
  "target", "source", "either"))

Arguments

edo

Event data

fun

function that returns TRUE for actor names that should be retained, or a name, or a vector of names

which

Which actor roles should be filtered. Defaults to 'both' (fun must return true for source and target)

Details

The which parameter specifies whether the filter should be applied only to actors in the target role, 'target', only to actors in the source role, 'source', all actors in the event data, 'both', or to any event having one of the specified actors in eithe rsource or target role, 'either'.

fun can be specified as a function that returns true for particular actor names, or as a list of actor names to retain, or a single actor name. The default fun and the default which settings return the event data unchanged.

Value

Events involving only actors that pass through fun

Author(s)

Will Lowe

See Also

filter_codes, filter_time, filter_dyad


conjugateprior/events documentation built on May 13, 2019, 9:56 p.m.