These functions allow users to add and edit information about the network itself. This includes the name, year, and mode of collection of the network, as well as definitions of the nodes and ties in the network. Where available, this information is printed for tidygraph-class objects, and can be used for printing a grand table in the {grand} package.

add_info(.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

...

Named attributes. The following are currently recognised: "name", "year", and "doi" of the network, "collection" or "mode" of the network ("survey", "interview","sensor","observation","archival", or "simulation"), "nodes" (a vector of the names of the nodes) or "vertex1"/"vertex2", "ties" or "edge.pos"/"edge.neg" for defining the ties.

Examples

add_info(ison_algebra, name = "Algebra")
#> # Algebra
#> # A multiplex, weighted, directed network of 16 nodes and 279 social, tasks,
#> and friends arcs
#> # A tibble: 279 × 4
#>    from    to type   weight
#>   <int> <int> <chr>   <dbl>
#> 1     1     5 social   1.2 
#> 2     1     5 tasks    0.3 
#> 3     1     8 social   0.15
#> 4     1     9 social   2.85
#> 5     1     9 tasks    0.3 
#> 6     1    10 social   6.45
#> # ℹ 273 more rows