manip_project {manynet} | R Documentation |
Modifying networks projection
Description
These functions offer tools for projecting manynet-consistent data:
-
to_mode1()
projects a two-mode network to a one-mode network of the first node set's (e.g. rows) joint affiliations to nodes in the second node set (columns). -
to_mode2()
projects a two-mode network to a one-mode network of the second node set's (e.g. columns) joint affiliations to nodes in the first node set (rows). -
to_ties()
projects a network to one where the ties become nodes and incident nodes become their ties.
Usage
to_mode1(.data, similarity = c("count", "jaccard", "rand", "pearson", "yule"))
to_mode2(.data, similarity = c("count", "jaccard", "rand", "pearson", "yule"))
to_ties(.data)
Arguments
.data |
An object of a manynet-consistent class:
|
similarity |
Method for establishing ties, currently "count" (default), "jaccard", or "rand".
|
Details
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_mode1 | 1 | 1 | 1 | 1 | 1 |
to_mode2 | 1 | 1 | 1 | 1 | 1 |
to_ties | 1 | 1 | 1 | 1 | 1 |
Value
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.
See Also
Other modifications:
manip_as
,
manip_correlation
,
manip_deformat
,
manip_from
,
manip_levels
,
manip_miss
,
manip_nodes
,
manip_paths
,
manip_permutation
,
manip_preformat
,
manip_reformat
,
manip_scope
,
manip_split
,
manip_ties
Examples
to_mode1(ison_southern_women)
to_mode2(ison_southern_women)
#graphr(to_mode1(ison_southern_women))
#graphr(to_mode2(ison_southern_women))
to_ties(ison_adolescents)
#graphr(to_ties(ison_adolescents))