drop_nodes {NetworkInference} | R Documentation |
Drop nodes from a cascade object
Description
Drop nodes from a cascade object
Usage
drop_nodes(cascades, nodes, drop = TRUE)
Arguments
cascades |
cascade, object to drop nodes from. |
nodes |
character or integer, vector of node_ids to drop. |
drop |
logical, Should empty cascades be dropped. |
Value
An object of class cascade containing the cascades without the dropped nodes.
Examples
data(policies)
cascades <- as_cascade_long(policies, cascade_node_name = 'statenam',
event_time = 'adopt_year', cascade_id = 'policy')
new_cascades <- drop_nodes(cascades, c("California", "New York"))
[Package NetworkInference version 1.2.4 Index]