These functions allow users to add and edit information about the network
itself.
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() adds information attributes to the network.
mutate_info() updates information attributes of the network.
net_attributes() lists the information attributes of the network.
add_info(.data, ...)
mutate_info(.data, ...)
net_attributes(.data)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
Named attributes. The following are currently recognised:
"name" is the name of the network
"modes" is the name(s) of the nodeset(s)
"layers" is the name(s) of the tie type(s)
"directed" is a logical vector indicating whether each layer is directed
"source" is the source of the network ("empirical" or "synthetic")
"method" is the method of data collection or model used (e.g. "survey", "interview","sensor","observation","archival", or "simulation")
"location" is the geographic, institutional, or digital location of the network
"date" is the date of data collection or model run
"boundary" is the boundary specification of the network ("ego", "roster", or "snowball")
"observation" is the observation type of the network ("cross-sectional", "panel", or "event")
"update" is the update type of the network ("increment" or "replacement")
"max_degree" is the maximum degree of the network
"min_degree" is the minimum degree of the network
"doi" is the DOI or URL of the network
If no arguments are used,
the function will check for missing information and prompt the user to add it.
If optional = TRUE is specified, the function will also prompt for optional information.
A data object of the same class as the function was given.
Not all functions have methods available for all object classes. Below are the currently implemented S3 methods for these functions:
If a method is not available for a particular class, but a default method is, the default method will attempt to coerce the object to a class for which a method is defined, and then coerce the output back to the original class. If no method is available for any class, an error will be thrown.
GRAND statement for more information on the Guidelines for Reporting About Network Data (GRAND).
Other manipulations:
manip_changes,
manip_global,
manip_nodes_attr,
manip_nodes_num,
manip_ties_attr,
manip_ties_num
add_info(ison_algebra, name = "Algebra")
#>
#> ── # Algebra ───────────────────────────────────────────────────────────────────
#> # A multiplex, weighted, directed network of 16 nodes and 62 friendship, 129
#> social, and 88 task ties
#>
#> ── Ties
#> # 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
#>