find.word.code.in.wordreportR Documentation

Find the index of the word

Description

Search at wordreporttolookat$name and find the index of the word with name awordtolookfor The index is the code of the word in the column.

Equivalent to which(grepl(awordtolookfor, allcentralitiesandgraphs$wordreport$name))

Usage

find.word.code.in.wordreport(
  awordtolookfor,
  wordreporttolookat,
  verbose = FALSE
)

Arguments

awordtolookfor

The word to look for

wordreporttolookat

The wordreport list to look for the centrality of the word (put the wordreport part of allcentralitiesandgraphs object)

verbose

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

Value

An integer with the index of the word awordtolookfor

Author(s)

Epaminondas Diamantopoulos

See Also

Equivalent to which(grepl(awordtolookfor, allcentralitiesandgraphs$wordreport$name))

Examples

# It is a time consuming function...


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

awordtolookfor = "Diet"
get.word.centrality(awordtolookfor, "centrality_authority", allcentralitiesandgraphs$wordreport)