R/measure_attributes.R
measure_attributes.Rd
These functions extract certain attributes from network data:
node_attribute()
returns an attribute's values for the nodes in a network.
node_names()
returns the names of the nodes in a network.
node_is_mode()
returns the mode of the nodes in a network.
tie_attribute()
returns an attribute's values for the ties in a network.
tie_weights()
returns the weights of the ties in a network.
tie_signs()
returns the signs of the ties in a network.
These functions are also often used as helpers within other functions.
node_*()
and tie_*()
always return vectors the same length
as the number of nodes or ties in the network, respectively.
node_attribute(.data, attribute)
node_names(.data)
node_is_mode(.data)
tie_attribute(.data, attribute)
tie_weights(.data)
tie_signs(.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
Character string naming an attribute in the object.
Other measures:
between_centrality
,
close_centrality
,
degree_centrality
,
eigenv_centrality
,
measure_closure
,
measure_cohesion
,
measure_features
,
measure_heterogeneity
,
measure_hierarchy
,
measure_holes
,
measure_infection
,
measure_net_diffusion
,
measure_node_diffusion
,
measure_periods
,
measure_properties
,
member_diffusion
node_attribute(ison_lotr, "Race")
#> [1] "Human" "Human" "Hobbit" "Elf" "Human" "Elf" "Elf" "Human"
#> [9] "Human" "Hobbit" "Elf" "Maiar" "Dwarf" "Elf" "Hobbit" "Hobbit"
#> [17] "Hobbit" "Hobbit" "Maiar" "Human" "Maiar" "Elf" "Ent" "Human"
#> [25] "Maiar" "Human" "Elf" "Human" "Elf" "Human" "Elf" "Elf"
#> [33] "Hobbit" "Human" "Maiar" "Human"
node_names(ison_southern_women)
#> [1] "Evelyn" "Laura" "Theresa" "Brenda" "Charlotte" "Frances"
#> [7] "Eleanor" "Pearl" "Ruth" "Verne" "Myra" "Katherine"
#> [13] "Sylvia" "Nora" "Helen" "Dorothy" "Olivia" "Flora"
#> [19] "E1" "E2" "E3" "E4" "E5" "E6"
#> [25] "E7" "E8" "E9" "E10" "E11" "E12"
#> [31] "E13" "E14"
node_is_mode(ison_southern_women)
#> Evelyn Laura Theresa Brenda Charlotte Frances Eleanor Pearl Ruth Verne Myra
#> 1 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> # ... with 7 more values from this nodeset unprinted. Use `print(..., n = Inf)` to print all values.
#> E1 E2 E3 E4 E5 E6 E7 E8 E9 E10 E11 E12 E13
#> 1 TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
#> # ... with 1 more values from this nodeset unprinted. Use `print(..., n = Inf)` to print all values.
tie_attribute(ison_algebra, "task_tie")
#> NULL
tie_weights(to_mode1(ison_southern_women))
#> V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13
#> 1 6 6 7 3 4 3 3 3 2 2 2 2 2
#> # ... with 126 more values from this nodeset unprinted. Use `print(..., n = Inf)` to print all values.
tie_signs(ison_marvel_relationships)
#> V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13
#> 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 1
#> # ... with 545 more values from this nodeset unprinted. Use `print(..., n = Inf)` to print all values.