extract_block | R Documentation |
Function creates a multilevel network object of class mlnet
. The object inherits the network
class, with additional information concerning the multilevel structure.
extract_block(net, block)
mlnet(network, node_memb, directed = FALSE)
## S3 method for class 'mlnet'
plot(
x,
node_size = 2.5,
palette = NULL,
memb_colors = NULL,
arrow.gap = 0.015,
arrow.size = 4,
color_legend_title = "",
legend = TRUE,
legend.position = "right",
layout_type = "kamadakawai",
...
)
net |
An object of class |
block |
Block identifier which should be an element of node_memb in the network. |
network |
Either a |
node_memb |
Vector (length equal to the number of nodes in the network) indicating to which block or group the nodes belong. |
directed |
( |
x |
An object of class |
node_size |
Controls the size of nodes. |
palette |
If package |
memb_colors |
Specifies the named colors to be used for the membership colors. |
arrow.gap |
(Directed graphs only) Controls the amount of space between arrowheads and the nodes. |
arrow.size |
(Directed graphs only) Controls the size of the arrowhead. |
color_legend_title |
Name for the node color legend title. |
legend |
( |
legend.position |
The position of the legend in the plot. Defaults to the "right" position. |
layout_type |
Viable layout options. See |
... |
Additional arguments to be passed to |
The mlnet
function creates an object of class mlnet
which is used to access methods designed specifically for multilevel networks, including visualization methods as well as direct interface with some of the main functions, such as mlergm
. Presently, the mlnet
function and object class cover multilevel structure where the set of nodes is nested within known block structure.
mlnet
returns an object of class mlnet
which inherits the network
class, with the additional vector attribute node_memb
, which encodes the block membership of the multilevel netwrok.
plot(mlnet)
: Plots network objects of type mlnet
.
extract_block()
: Extracts a specified block subgraph from a network object of type mlnet
.
# Show how the sampson dataset can be turned into an mlnet object
data(sampson)
net <- mlnet(samplike, get.vertex.attribute(samplike, "group"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.