These functions reformat manynet-consistent data.
to_directed() reformats undirected network data to a directed network.
to_undirected() reformats directed network data to an undirected network,
so that any pair of nodes with at least one directed edge will be
connected by an undirected edge in the new network.
This is equivalent to the "collapse" mode in {igraph}..
to_redirected() formats directed network data by flipping/transposing
any existing direction such that senders become receivers and
receivers become senders.
This essentially has no effect on undirected networks or reciprocated ties.
to_reciprocated() reformats directed network data such that every
directed tie is reciprocated.
to_acyclic() reformats network data to an acyclic graph.
If the format condition is not met,
for example to_undirected() is used on a network that is already undirected,
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_directed(.data)
to_undirected(.data)
to_redirected(.data)
to_reciprocated(.data)
to_acyclic(.data)All to_ functions return an object of the same class as that provided.
So passing it an igraph object will return an igraph object
and passing it a network object will return a network object,
with certain modifications as outlined for each function.
Not all functions have methods available for all object classes. Below are the currently implemented S3 methods:
| data.frame | igraph | matrix | network | tbl_graph | |
| to_undirected | 1 | 1 | 1 | 1 | 1 |
Other modifications:
manip_as,
manip_correlation,
manip_deformat,
manip_from,
manip_levels,
manip_miss,
manip_nodes,
manip_paths,
manip_permutation,
manip_preformat,
manip_project,
manip_reformat,
manip_scope,
manip_split,
manip_ties