read_egonet {egor} | R Documentation |
Read ego-centered network data exported with EgoNet software as an egor
object
Description
This function imports ego-centered network data from folders with separate files for alters-level and edge data. It will run some basic checks upon the completeness of the data and inform the user of potential problems. This function can be used to import data exported from EgoNet (McCarty 2011).
Usage
read_egonet(
egos.file,
alter.folder,
edge.folder,
csv.sep = ",",
ID.vars = list(ego = "egoID", alter = "alterID", source = "Source", target = "Target"),
first.col.row.names = FALSE,
...
)
Arguments
egos.file |
File name of the .csv file containing the ego data. |
alter.folder |
Folder name of the folder containing the alter data in separate .csv files for each ego/ network. |
edge.folder |
Folder name of the folder containing the edge/ tie data in separate .csv files for each ego/ network. |
csv.sep |
|
ID.vars |
A named list containing column names of the relevant input columns:
|
first.col.row.names |
|
... |
additional arguments to |
Value
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
Examples
egos.file <- system.file("extdata", "egos_32.csv", package = "egor")
alters.folder <- system.file("extdata", "alters_32", package = "egor")
edge.folder <- system.file("extdata", "edges_32", package = "egor")
ef <- read_egonet(egos.file = egos.file,
alter.folder = alters.folder,
edge.folder = edge.folder,
csv.sep = ";")