Description Usage Arguments Value Functions Examples
These functions read ego-centered network data from the three files format, EgoWeb2.0 or openeddi and transform it to an egoR object. The three files format consists of an ego file, on alteri file and one file containing the edge data. EgoWeb2.0 and openeddi use variations of this format.
1 2 3 4 5 6 7 8 | read.egonet.three.files(egos, alteri.df, edges, ID.vars = c("egoID",
"alterID", "Source", "Target"), ego.vars = NULL)
read.egoweb(alter.file, edges.file, egos.file = NULL, ID.vars = c("EgoID",
"Alter.Number", "Alter.1.Number", "Alter.2.Number"), ego.vars = NULL)
read.openeddi(egos.file = NULL, alteri.file = NULL, edges.file = NULL,
ID.vars = c("puid", "nameid", "nameid", "targetid"), ego.vars = NULL)
|
egos |
|
alteri.df |
|
edges |
|
ID.vars |
A character vector specifying ID variable names used (egoID, alterID, source, target). |
ego.vars |
A |
alter.file |
A character specifiying the filename of the alteri data. |
edges.file |
A character specifiying the filename of the edge data. |
egos.file |
A character specifiying the filename of the ego data. |
alteri.file |
|
A list
of six objects - the **egoR** object: (1) egos.df: dataframe
of all
egos and their attributes; (2) alteri.df: dataframe
of all alteri;
(3) alteri.list: list
of dataframes
of all alteri per ego;
(4) edges: list
of dataframes
with edge lists per network; (5)
graphs: list
of igraph objects; (6) results: a result dataframe
,
pre-populated with the network size of each network
read.egoweb
: This function reads in data from
an EgoWeb 2.0 survey and transforms it to an egoR object. If no file name for
the egos file is provided ego data is assumed to be merged with alteri data
and it will be extracted by read.egoweb
. By default the
standard ID variable names of EgoWeb are used, if you need to specify the ID
variable names use the ID.vars parameter. Further Information:
github.com/qualintitative/egoweb
read.openeddi
: This function reads in data created
by the openeddi survey software and transforms it to an egoR object. If no
parameters are provided read.openeddi
will try to find the adequate files
in the working directory. By default the standard ID variable names of openeddi
are used, if you need to specify the ID variable names use the ID.vars parameter.
Further Information: www.openeddi.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # The data for read.egonet.threefiles() needs to be loaded with read.csv(),
# for it to be converted to an egoR object.
egos.file <- system.file("extdata", "egos_32.csv", package = "egonetR")
alteri.file <- system.file("extdata", "alteri_32.csv", package = "egonetR")
edges.file <- system.file("extdata", "edges_32.csv", package = "egonetR")
egos <- read.csv2(egos.file)
alteri <- read.csv2(alteri.file)
edges <- read.csv2(edges.file)
tf <- read.egonet.three.files(egos = egos, alteri.df = alteri, edges = edges)
# read.egoweb() and read.openeddi() read the files directly from the disk.
setwd(system.file("extdata", "openeddi", package = "egonetR"))
oe <- read.openeddi()
setwd(system.file("extdata", "egoweb", package = "egonetR"))
ew <- read.egoweb(alter.file = "alteri_32.csv", edges.file = "edges_32.csv",
egos.file = "egos_32.csv")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.