
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))
find.word.code.in.wordreport(
awordtolookfor,
wordreporttolookat,
verbose = FALSE
)
The word to look for
The wordreport list to look for the centrality of the word (put the wordreport part of allcentralitiesandgraphs object)
Set to TRUE if quiet use is not desired. Default is set to FALSE (do not show warning messages)
An integer with the index of the word awordtolookfor
Equivalent to which(grepl(awordtolookfor, allcentralitiesandgraphs$wordreport$name))
# 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