Does a node attribute exist?

node_attr_exists(.net, .node_attr)

Arguments

.net

network of class igraph or network.

.node_attr

character scalar corresponding to the name of a node attribute in .net.

Value

logical scalar

Examples

node_attr_exists(.net = florence_business_ig, .node_attr = "wealth")
#> [1] TRUE
florence_business_nw %>% node_attr_exists(.node_attr = "priors")
#> [1] TRUE
florence_business_ig %>% node_attr_exists(.node_attr = "fake attr")
#> [1] FALSE