These functions reformat the levels in manynet-consistent network data.
to_onemode() reformats two-mode network data into one-mode network data by simply removing the nodeset 'type' information.
Note that this is not the same as to_mode1() or to_mode2().
to_twomode() reformats one-mode network data into two-mode network data, using a mark to distinguish the two sets of nodes.
to_multilevel() reformats two-mode network data into multimodal network data, which allows for more levels and ties within modes.
If the format condition is not met,
for example to_onemode() is used on a network that is already one-mode,
the network data is returned unaltered.
No warning is given so that these functions can be used to ensure conformance.
Unlike the as_*() group of functions,
these functions always return the same class as they are given,
only transforming these objects' properties.
to_onemode(.data)
to_twomode(.data, mark)
to_multilevel(.data)An object of a {manynet}-consistent class:
matrix (adjacency or incidence) from {base} R
edgelist, a data frame from {base} R or tibble from {tibble}
igraph, from the {igraph} package
network, from the {network} package
tbl_graph, from the {tidygraph} package
A logical vector marking two types or modes. By default "type".
A tidygraph object modified as explained in the function description, details, or section.
Not all functions have methods available for all object classes. Below are the currently implemented S3 methods:
Other modifications:
modif_correlation,
modif_direction,
modif_from,
modif_labels,
modif_miss,
modif_paths,
modif_permutation,
modif_plexity,
modif_project,
modif_scope,
modif_split,
modif_weight