These functions reformat tie attributes like their weight or sign:
to_unweighted() reformats weighted network data to unweighted network
data, with all tie weights removed.
to_unsigned() reformats signed network data to unsigned network data
keeping just the "positive" or "negative" ties.
to_normalised() rescales tie weights relative to the other ties of the
same node, so that a value reads as a share rather than a count.
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_unsigned(.data, keep = c("positive", "negative"))
to_unweighted(.data, threshold = 1)
to_signed(.data, mark = NULL)
to_weighted(.data, measure = NULL)
to_normalised(
.data,
rule = c("max", "mean", "sum"),
across = c("both", "rows", "columns")
)
to_normalized(
.data,
rule = c("max", "mean", "sum"),
across = c("both", "rows", "columns")
)An object of a {manynet}-consistent class:
adjacency or incidence matrix from {base} R
edgelist data.frame from {base} R or tbl/tbl_df from {tibble}
stocnet stocnet, from the {manynet} package
igraph igraph, from the {igraph} package
network network, from the {network} package
tidygraph tbl_graph, from the {tidygraph} package
In the case of a signed network, whether to retain the "positive" or "negative" ties.
For a matrix, the threshold to binarise/dichotomise at.
A mark (logical vector) the length of the ties in the network.
A numeric vector (measure) that will be added as the tie weights to the network. If this is NULL, then the tie weights will be drawn from a Poisson distribution with \(\lambda = 4\).
How each tie value is rescaled, relative to the other values recorded for the same node.
"max" (the default) divides by the largest of them, so that a node's strongest tie is 1 and its others are read against that.
"mean" divides by the average of them, counting every dyad and not just those tied, so that 1 marks a tie of typical strength.
"sum" divides by the total of them, so that they add to 1 and each reads as the share of the node's ties that goes to that partner.
Missing values propagate rather than being ignored,
so that a node with an unobserved tie has all its values unobserved.
Use impute_ties() first to state a different assumption.
Which margin of the network the operation is taken over. "rows" is the sending margin, so that each node is treated by the ties it sends; "columns" is the receiving margin; and "both" combines them. The two margins coincide for an undirected network, where all three options therefore agree. A two-mode network raises no such question, so "rows" and "columns" there are just the two nodesets.
Note that both the default and what "both" combines differ by function.
to_normalised() defaults to "both", where it divides by the square root
of the two denominators multiplied together, since that is the only
rescaling that preserves a network's symmetry.
to_proximity() defaults to "rows", the conventional profile for
structural equivalence, and there "both" compares each node's sent and
received ties together.
An object of the same class as the function was given, modified as explained in the function description, details, or section. Functions that split a network return a list of such objects.
Not all functions have methods available for all object classes. Below are the currently implemented S3 methods:
data.frame default igraph matrix network stocnet tbl_graph
to_normalised * * * * * * *
to_signed * * * * * *
to_unsigned * * * * * * *
to_unweighted * * * * * * *
to_weighted * * * *to_normalised() divides by the sending node's denominator for "rows",
so that a value says what share of \(i\)'s ties goes to \(j\),
and by the receiving node's denominator for "columns".
Rescaling a one-mode network across its rows or columns makes it asymmetric, since what \(i\) sends \(j\) is generally not what \(j\) sends \(i\). Where such a network is undirected, each tie is therefore split into two, and the network is returned directed.
Other ties:
manip_ties_attr,
manip_ties_num,
modif_backbone,
modif_direction
Other modifications:
modif_backbone,
modif_direction,
modif_from,
modif_labels,
modif_levels,
modif_miss,
modif_motifs,
modif_paths,
modif_permutation,
modif_plexity,
modif_project,
modif_proximity,
modif_scope,
modif_split
to_normalised(ison_networkers, rule = "sum", across = "rows")
#>
#> ── # EIES Networkers ───────────────────────────────────────────────────────────
#> # A labelled, weighted, directed network of 32 nodes and 440 arcs
#>
#> ── Nodes
#> # A tibble: 32 × 3
#> name Discipline Citations
#> <chr> <chr> <dbl>
#> 1 Lin Freeman Sociology 19
#> 2 Doug White Anthropology 3
#> 3 Ev Rogers Other 170
#> 4 Richard Alba Sociology 23
#> 5 Phipps Arabie Other 16
#> 6 Carol Barner-Barry Other 6
#> # ℹ 26 more rows
#>
#> ── Ties
#> # A tibble: 440 × 3
#> from to weight
#> <int> <int> <dbl>
#> 1 1 2 0.154
#> 2 1 3 0.00883
#> 3 1 4 0.0205
#> 4 1 5 0.00631
#> 5 1 6 0.0205
#> 6 1 7 0.0142
#> # ℹ 434 more rows
#>