View source: R/patterns_in_topics.R
patterns_in_topics | R Documentation |
Check occurrence and rank of patterns per topic
patterns_in_topics(term_patterns, topics, check_n_top_terms = 50)
term_patterns |
The term patterns to be checked for each topic.
Passed to |
topics |
A character |
check_n_top_terms |
The number of top terms to be considered for the check. |
A list of character matrices named after and having elements equal to number of term_patterns
.
Matrices contain the input topics
reduced to the columns that contain the pattern to be checked
and reduced to number of rows as specified via check_n_top_terms
.
Furthermore, the minimum rank (1 is best) of the pattern in each topic is pasted into the respective colname.
patterns_in_topics(term_patterns = c("environ*", "terms") , topics = cbind(c("irrelevant", "topic", "terms"), c("global", "environmental", "protection")) , check_n_top_terms = 2) $`environ*` Topic 2 - min_rank_2 [1,] "global" [2,] "environmental" $terms NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.