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

Description Usage Arguments Value Examples

View source: R/wordgraph_package.R

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

1
2
3
4
5
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# It is a time consuming function...

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)

wordgraph documentation built on July 1, 2020, 10:01 p.m.