ego_reshape | R Documentation |
ego_reshape
)The ego_reshape
function reshapes egocentric network data stored in a single wide dataset into three dataframes optimized for use with ego_netwrite
.
ego_reshape(
data,
ego_id,
ego_vars,
alters,
alter_vars,
alter_alter,
aa_vars = NULL,
directed = NULL,
loops = NULL,
missing_code = 99999,
output_name = "ego_long"
)
data |
A data frame containing egocentric network data in a wide format. |
ego_id |
A character value indicating the name of the column in |
ego_vars |
A character vector indicating the names of the columns in |
alters |
A character vector indicating the names of the columns in |
alter_vars |
A character vector indicating the names of the columns in |
alter_alter |
A character vector indicating the names of the columns in |
aa_vars |
A character vector indicating the names of the columns in |
directed |
A logical value indicating whether alter-alter ties are directed or undirected. |
loops |
A logical value indicating whether alter-alter ties contain self-loops (alters can be tied to themselves). |
missing_code |
A numeric value indicating "missing" values in the alter-alter edgelist. |
output_name |
A character value indicating the name or prefix that should be given to output objects. |
A list containing three data frames: an ego list, an ego-alter edgelist, and an alter-alter edgelist. These dataframes are optimized for use with ego_netwrite
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.