These functions reformat manynet-consistent data.

  • to_anti() reformats network data into its complement, where only ties not present in the original network are included in the new network.

Unlike the as_*() group of functions, these functions always return the same class as they are given, only transforming these objects' properties.

to_anti(.data)

Arguments

.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

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.

Details

Not all functions have methods available for all object classes. Below are the currently implemented S3 methods:

data.frameigraphmatrixnetworktbl_graph
to_acyclic11111
to_anti11111
to_reciprocated11111
to_redirected11111

Examples

to_anti(ison_southern_women)
#> # A labelled, two-mode network of 32 nodes and 163 ties
#> 
#> ── Nodes 
#> # A tibble: 32 × 2
#>   type  name     
#>   <lgl> <chr>    
#> 1 FALSE Evelyn   
#> 2 FALSE Laura    
#> 3 FALSE Theresa  
#> 4 FALSE Brenda   
#> 5 FALSE Charlotte
#> 6 FALSE Frances  
#> # ℹ 26 more rows
#> 
#> ── Ties 
#> # A tibble: 163 × 2
#>    from    to
#>   <int> <int>
#> 1     1    25
#> 2     1    28
#> 3     1    29
#> 4     1    30
#> 5     1    31
#> 6     1    32
#> # ℹ 157 more rows
#>