count_word {simplifyEnrichment} | R Documentation |
Calculate word frequency
count_word(term, exclude_words = NULL)
term |
A vector of description texts. |
exclude_words |
The words that should be excluded. |
The text preprocessing followings the instructions from http://www.sthda.com/english/wiki/word-cloud-generator-in-r-one-killer-function-to-do-everything-you-need .
A data frame with words and frequencies.
gm = readRDS(system.file("extdata", "random_GO_BP_sim_mat.rds", package = "simplifyEnrichment")) go_id = rownames(gm) go_term = AnnotationDbi::select(GO.db::GO.db, keys = go_id, columns = "TERM")$TERM count_word(go_term)