Description Usage Arguments Value Author(s) Examples
View source: R/wordgraph_package.R
The function return a vector with the centrality scores of the items (i.e. words) of the variable columnwithoriginalwords. The centrality scores are retreived from the wordreport, an object that has been created previously by the function get.all.graphs.
1 2 3 4 5 6 | create.centrality.variable(
centralityfunctionstr,
columnwithoriginalwords,
awordreport,
verbose = FALSE
)
|
centralityfunctionstr |
The type of the centrality function to use |
columnwithoriginalwords |
The column to look for the words |
awordreport |
The awordreport to look for the centrality of each word |
verbose |
Set to true to print every correspondence |
A vector containing the centralities of the words contained in columnwithoriginalwords
Epaminondas Diamantopoulos
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # It is a time consuming function...
allgraphs = get.all.graphs(c("diet1stword", "diet2ndword", "diet3rdword"),
freeassociationdata)
centralities_vector1 = create.centrality.variable("centrality_betweenness",
freeassociationdata$exercise1stword, allgraphs$wordreport)
centralities_vector2 = create.centrality.variable("centrality_alpha",
freeassociationdata$exercise1stword, allgraphs$wordreport)
centralities_vector3 = create.centrality.variable("centrality_authority",
freeassociationdata$exercise1stword, allgraphs$wordreport)
centralities_vector4 = create.centrality.variable("centrality_closeness",
freeassociationdata$exercise1stword, allgraphs$wordreport)
centralities_vector5 = create.centrality.variable("centrality_pagerank",
freeassociationdata$exercise1stword, allgraphs$wordreport)
centralities_vector6 = create.centrality.variable("centrality_eigen",
freeassociationdata$exercise1stword, allgraphs$wordreport)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.