I am trying to calculate centrality metrics for a specific node within a graph using statnet
(I can't just use igraph
since it doesn't have certain metrics I'd like).
How do I use the nodes argument of these functions to specify this? For example, take prestige
# use the faux.magnolia.high dataset from ergm (1461 vertices and 974 edges)
library("ergm")
data(“faux.magnolia.high”)
# Try calculating for node 1
sna::prestige(faux.magnolia.high, nodes = 1, gmode = "graph")
1
# Try calculating for node 2
sna::prestige(faux.magnolia.high, nodes = 2, gmode = "graph")
NA