Learn R Programming

wordgraph (version 0.1.0)

get.word.centrality: Returns the centrality of the word.

Description

Loop into the entries of the wordreporttolookat, find the centrality function described by centralityfunctionstr and returns the centrality of the word. If there is not a corresponding code then the function return NA

Usage

get.word.centrality(
  awordtolookfor,
  centralityfunctionstr,
  wordreporttolookat,
  verbose = FALSE)

Arguments

awordtolookfor

The word to look for

centralityfunctionstr

The centrality function description string

wordreporttolookat

The wordreport list to look for the centrality of the word

verbose

Set to TRUE if quiet use is not desired. Default is set to FALSE (do not show warning messages)

Value

A double with the centrality of the word awordtolookfor

Examples

Run this code
# NOT RUN {
# It is a time consuming function...
# }
# NOT RUN {
freeassociationdata_part = dplyr::sample_n(freeassociationdata, 10)

  allcentralitiesandgraphs = get.all.graphs(
                    c("diet1stword", "diet2ndword", "diet3rdword"),
                    freeassociationdata_part)

get.word.centrality("Enjoyment", "centrality_authority",
                        allcentralitiesandgraphs$wordreport)
# }

Run the code above in your browser using DataLab