These functions return logical vectors the length of the ties in a network identifying which hold certain properties or positions in the network.

  • tie_is_loop() marks ties that are loops.

  • tie_is_feedback() marks ties that are feedback arcs causing the network to not be acyclic.

  • tie_is_bridge() marks ties that cut or act as articulation points in a network.

  • tie_is_path() marks ties on a path from one node to another.

They are most useful in highlighting parts of the network that are particularly well- or poorly-connected.

tie_is_loop(.data)

tie_is_feedback(.data)

tie_is_bridge(.data)

tie_is_path(.data, from, to, all_paths = FALSE)

Arguments

.data

A network object of class stocnet, igraph, tbl_graph, network, or similar. Internally any of these will be coerced to an efficient implementation. For more information on possible coercions, see e.g. manynet::as_stocnet().

from

The index or name of the node from which the path should start.

to

The index or name of the node to which the path should be traced.

all_paths

Whether to return a list of paths or sample just one. By default FALSE, sampling just a single path.

Value

A tie_mark logical vector the length of the ties in the network, giving either TRUE or FALSE for each tie depending on whether the condition is matched.

Cognitive social structures

A cognitive social structure records each node's report of the ties in the whole network, in a by column that names who reported each tie. Counting every report as a tie of its own would count each tie once for every perceiver who reports it. So the functions here first combine the reports into the locally aggregated structure of Krackhardt (1987), with the intersection rule: a tie exists if both of its ends report it, and a message says so. A tie that names no reporter is kept as it is.

A tie-level function still returns one value for each report, so that the result can be added back to the network it was given. Each report takes the value of the tie that it reports. A report of a tie that is not in the aggregated structure takes NA, or FALSE for a mark. tie_is_random() is the exception, and draws among the reports.

To combine the reports in a different way, do this before the function, e.g. with manynet::to_aggregated(over = "by").

Krackhardt, David. 1987. "Cognitive social structures". Social Networks 9(2): 109-134. doi:10.1016/0378-8733(87)90009-8

Examples

tie_is_loop(fict_marvel)
#>   `Abomination-Abomination` `Abomination-Beast` `Abomination-Colossus`
#> 1 TRUE                      FALSE               FALSE                 
#> # ... and 1238 more values from this nodeset. Use `print_all(...)` to print all values.
tie_is_feedback(ison_algebra)
#>   `1->5` `1->5` `1->8` `1->9` `1->9` `1->10` `1->10` `1->11` `1->12` `1->12`
#> 1 TRUE   TRUE   TRUE   TRUE   TRUE   TRUE    TRUE    TRUE    TRUE    TRUE   
#> # ... and 269 more values from this nodeset. Use `print_all(...)` to print all values.
tie_is_bridge(ison_brandes)
#>   `1-3` `2-3` `3-4` `4-5` `4-6` `5-7` `6-7` `6-8` `7-9` `8-9` `9-10` `9-11`
#> 1 TRUE  TRUE  TRUE  FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE   TRUE  
ison_adolescents |>
  mutate_ties(route = tie_is_path(from = "Jane", to = 7)) 
#> 
#> ── # The Adolescent Society ────────────────────────────────────────────────────
#> # A labelled, multiplex, undirected network of 8 adolescents and 10 friendship
#> ties
#> 
#> ── Nodes 
#> # A tibble: 8 × 1
#>   name 
#>   <chr>
#> 1 Betty
#> 2 Sue  
#> 3 Alice
#> 4 Jane 
#> 5 Dale 
#> 6 Pam  
#> # ℹ 2 more rows
#> 
#> ── Ties 
#> # A tibble: 10 × 3
#>    from    to route     
#>   <int> <int> <tie_mark>
#> 1     1     2 FALSE     
#> 2     2     3 FALSE     
#> 3     3     4 TRUE      
#> 4     2     5 FALSE     
#> 5     3     5 FALSE     
#> 6     4     5 FALSE     
#> # ℹ 4 more rows
#>