Learn R Programming

events (version 0.5)

map_actors: Aggregate actor codes

Description

Aggregates actor codes

Usage

map_actors(edo, fun = function(x) { return(x) })

Arguments

edo
Event data
fun
Function or list specifying the aggregation mapping

Value

Event data with new actor codes

Details

The function relabels actor codes according to the filter. The filter may either be a function that returns the new name of an event when handed the old one, or a list structured like list(fruit=c('tomato', 'orange'), veg=c('red pepper', 'carrot')).

This function can also be used as a renaming function, but it is most useful when multiple codes should be treated as equivalent.

See Also

map_codes