count_word {simplifyEnrichment}R Documentation

Calculate word frequency

Description

Calculate word frequency

Usage

count_word(term, exclude_words = NULL)

Arguments

term

A vector of description texts.

exclude_words

The words that should be excluded.

Details

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 .

Value

A data frame with words and frequencies.

Examples

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)

[Package simplifyEnrichment version 1.2.0 Index]