View source: R/read.ego.folders.R
read_egonet | R Documentation |
egor
objectThis 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).
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,
...
)
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 |
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
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 = ";")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.