Learn R Programming

wordgraph (version 0.1.0)

get.all.graphs: Creates one ggraph object for each available centrality functions.

Description

Creates a ggraph object for each available centrality function. A data frame with the words and all centralities indexes is also included. The combinations of all word pairs are computed for all concecutive pair of variables and the centrality of each word is calculated according to all available centrality functions. The wordreport list gives the opportunity to the researcher to compare centralities indexes for the words.

Usage

get.all.graphs(
          wordvars,
          data.df,
          iscircled = FALSE,
          verbose = FALSE)

Arguments

wordvars

The vector containing the names of the variables

data.df

The data frame where the variables belong.

iscircled

Should take also the combination between last and first variable (var_n - var1)? Default is FALSE.

verbose

Should show also warning messages? The default is FALSE.

Value

A list of objects "graphs" and "wordreport" which are themselves also lists.

graphs

The graphs list contains the graph data for each one centrality index.

wordreport

The wordreport list contains all centrality indexes for every different word that participates in a combination among wordvars variable vector.

References

http://www.sthda.com/english/articles/33-social-network-analysis/136-network-analysis-and-manipulation-using-r/

See Also

get.graph.1.n.group.centrality.with.function

Examples

Run this code
# NOT RUN {
# It is a time consuming function...

# }
# NOT RUN {
allgraphs = get.all.graphs(c("diet1stword", "diet2ndword", "diet3rdword"),
freeassociationdata)

# Get insight in the relation of the centralities for your word set...
cor(allgraphs$wordreport[2:7])

# Plot a particular graph by giving the command
graph_plot(allgraphs$graphs$centrality_closeness)
# }

Run the code above in your browser using DataLab