Learn R Programming

wordgraph (version 0.1.0)

find.word.code.in.wordreport: 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

See Also

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

Examples

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

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

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

Run the code above in your browser using DataLab