twofiles_to_egor | R Documentation |
This function imports ego-centered network data, stored in two files, where one file contains the ego attributes and the edge information and the other file contains the alters data. This form of data storage for ego-centered network data is proposed by Muller, Wellman and Marin (1999).
twofiles_to_egor(
egos,
alters,
ID.vars = list(ego = "egoID", alter = "alterID", source = "Source", target = "Target"),
max.alters,
aa.first.var,
selection = NULL,
...
)
egos |
|
alters |
|
ID.vars |
A named list containing column names of the relevant input columns:
|
max.alters |
Maximum number of alters that are included in edge data. |
aa.first.var |
Index or name of the first column in |
selection |
|
... |
additional arguments to |
An egor object is returned. It is a list
of three data frames:
(1) ego: dataframe
of all
egos and their attributes;
(2) alter: dataframe
of all alters;
(3) aatie: dataframe
of alter alter ties/ edges
path_to_alters_8.csv <- system.file("extdata", "alters_8.csv", package = "egor")
path_to_one_file_8 <- system.file("extdata", "one_file_8.csv", package = "egor")
# read data from disk
egos_8 <- read.csv2(path_to_one_file_8)
alters_8 <- read.csv2(path_to_alters_8.csv)
# convert to egor object
twofiles_to_egor(
egos = egos_8,
alters = alters_8,
max.alters = 8,
aa.first.var = "X1.to.2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.