# NOT RUN {
# It is a time consuming function...
# }
# NOT RUN {
agraph = get.graph.1.n.group.centrality.with.function(
c("diet1stword", "diet2ndword", "diet3rdword"),
tidygraph::centrality_authority(),
freeassociationdata)
# To plot the graph simply call:
agraph
# The centrality scores are available at:agraph$data$centrality
hist(agraph$data$centrality)
# Other available centrality functions...
agraph = get.graph.1.n.group.centrality.with.function(
c("diet1stword", "diet2ndword", "diet3rdword"),
tidygraph::centrality_betweenness(), freeassociationdata)
# Note: closeness centrality is not well-defined for disconnected graphs.
agraph = get.graph.1.n.group.centrality.with.function(
c("diet1stword", "diet2ndword", "diet3rdword"),
tidygraph::centrality_closeness(), freeassociationdata)
agraph = get.graph.1.n.group.centrality.with.function(
c("diet1stword", "diet2ndword", "diet3rdword"),
tidygraph::centrality_pagerank(), freeassociationdata)
agraph = get.graph.1.n.group.centrality.with.function(
c("diet1stword", "diet2ndword", "diet3rdword"),
tidygraph::centrality_eigen(), freeassociationdata)
agraph = get.graph.1.n.group.centrality.with.function(
c("diet1stword", "diet2ndword", "diet3rdword"),
tidygraph::centrality_alpha(), freeassociationdata)
# }
Run the code above in your browser using DataLab