as_igraph | R Documentation |
egor
object to network
or igraph
objectsThese functions convert an egor
object into a list of network
or igraph
objects.
By default ego itself is not included in the created objects, there is
a parameter (include.egor) that allows for including ego.
as_igraph(
x,
directed = FALSE,
include.ego = FALSE,
ego.attrs = NULL,
ego.alter.weights = NULL,
graph.attrs = ".egoID"
)
## S3 method for class 'nested_egor'
as_igraph(
x,
directed = FALSE,
include.ego = FALSE,
ego.attrs = NULL,
ego.alter.weights = NULL,
graph.attrs = ".egoID"
)
## S3 method for class 'egor'
as.igraph(
x,
directed = FALSE,
include.ego = FALSE,
ego.attrs = NULL,
ego.alter.weights = NULL,
graph.attrs = ".egoID"
)
as_network(
x,
directed = FALSE,
include.ego = FALSE,
ego.attrs = NULL,
ego.alter.weights = NULL,
graph.attrs = ".egoID"
)
## S3 method for class 'egor'
as.network(
x,
directed = FALSE,
include.ego = FALSE,
ego.attrs = NULL,
ego.alter.weights = NULL,
graph.attrs = ".egoID"
)
x |
An |
directed |
Logical, indicating if alter-alter relations are directed. |
include.ego |
|
ego.attrs |
Vector of names (character) or indices (numeric) of ego
variables that should be carried over to the network/
igraph objects. This is ignored, when |
ego.alter.weights |
Vector of names (character) or indices (numeric) of alter variables that should be carried over to the the network/ igraph objects, as edge attributes of the ego-alter relations. This is ignored, when 'include.ego = FALSEā (default). |
graph.attrs |
Vector of names (character) or indices (numeric) of
ego variables that are supposed to be carried over to the igraph object
as graph attributes or the network object as network attributes. By
default |
The names of the variables specified in ego.attr and ego.alter.attr need to be the same as the names of corresponding alter attributes, in order for those variables to be merged successfully in the resulting network/ igraph object (see example).
e <- make_egor(3, 22)
as_igraph(e)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.