get_egograph {ideanet} | R Documentation |
Selecting Individual Networks from ego_netwrite
Output (get_egograph
)
Description
The get_egograph
function extracts one or more specific ego networks from a list object created by ego_netwrite
. Specifically, it extracts the igraph
objects associated with the ego networks selected by the user. This can be useful for close inspection and/or comparison of individual ego networks in your data.
Usage
get_egograph(egonw = NULL, ego_id = NULL)
Arguments
egonw |
A list created by |
ego_id |
A single numeric value indicating the |
Value
get_egograph
returns a list containing the contents of the igraph_objects
list found in egonw
corresponding to the values specified in ego_id
.
Examples
# Run `ego_netwrite`
ngq_nw <- ego_netwrite(egos = ngq_egos,
ego_id = ngq_egos$ego_id,
alters = ngq_alters,
alter_id = ngq_alters$alter_id,
alter_ego = ngq_alters$ego_id,
max_alters = 10,
alter_alter = ngq_aa,
aa_ego = ngq_aa$ego_id,
i_elements = ngq_aa$alter1,
j_elements = ngq_aa$alter2,
directed = FALSE)
# Select `igraph` objects associated with `ego_id` 3.
ego3 <- get_egograph(ngq_nw, 3)
[Package ideanet version 1.1.1 Index]