I have been trying to subgraph a population-wide network into 2 smaller subgraphs each consisting of only males and females in order to visualize sex-linked sociality and other various network measurements across the sexes.
However, I cannot seem to get the subgraph function to work properly on my data
My node attributes are stored as “Sex” inside the network as an either “M” or “F”
I have used an older textbook that stated I should run:
Female_network <- get.inducedSubgraph(myNetwork,
which (myNetwork %>% "Sex" == F))
and I understand get.inducedSubgraph
has depreciated.
I have also tried
Female_network <- subgraph(myNetwork, My_network$Sex[["F"]]
which also has been deprecated in favor of igraph_induced_subgraph
. However, when that function is run it can also not be found.
I’m sure I’m missing a very basic command to do this but I can’t seem to get anything to work. Any help would be greatly appreciated