Get Node Attributes

node_get_attr(x, attr_name, which_nodes = seq_nodes(x), ...)

# S3 method for igraph
node_get_attr(x, attr_name, which_nodes = seq_nodes(x),
  ...)

# S3 method for network
node_get_attr(x, attr_name, which_nodes = seq_nodes(x),
  auto_unlist = TRUE, ...)

Arguments

x

<igraph> or <network>

attr_name

<character> (scalar)

which_nodes

<numeric> or <logical>

...

Arguments passed to or from other methods.

auto_unlist

If possible, safely flatten the result to an atomic vector.

Value

atomic vector or <list>

Examples

#> [1] 5
#> [1] 5