Description Usage Arguments Details Value See Also
View source: R/compare_mir_terms.R
Plot count of top terms associated with a miRNA name.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | plot_mir_terms(
df,
mir,
top = 20,
tf.idf = FALSE,
token = "words",
...,
stopwords = stopwords_miretrieve,
stopwords_ngram = TRUE,
normalize = TRUE,
colour = "steelblue3",
col.mir = miRNA,
col.abstract = Abstract,
col.pmid = PMID,
title = NULL
)
|
df |
Data frame containing miRNA names, abstracts, and PubMed-IDs. |
mir |
String. miRNA name of interest. |
top |
Integer. Number of top terms to plot. |
tf.idf |
Boolean. If |
token |
String. Specifies how abstracts shall be split up. Taken from
|
... |
Additional arguments for tokenization, if necessary. |
stopwords |
Data frame containing stop words. |
stopwords_ngram |
Boolean. Specifies if stop words shall be removed
from abstracts when using ngrams. Only applied when |
normalize |
Boolean. If |
colour |
String. Colour of bar plot. |
col.mir |
Symbol. Column containing miRNA names |
col.abstract |
Symbol. Column containing abstracts. |
col.pmid |
Symbol. Column containing PubMed-IDs. |
title |
String. Title plot. |
Plot count of top terms associated with a miRNA name.
Top terms associated with mir
have to be in df
as abstracts.
Number of top terms to plot is regulated via the top
argument.
Terms can either be evaluated as their count or in a tf-idf fashion.
If terms are evaluated as their count, they can either be
evaluated as their raw count, e.g. in how many abstracts they are mentioned
in conjunction with the miRNA name, or as their relative count, e.g.
in how many abstracts containing the miRNA they are mentioned compared to all
abstracts containing the miRNA.
If terms are evaluated in a tf-idf fashion, miRNA names are considered as
separate documents and
terms often associated with one miRNA, but not with other miRNAs get
more weight.
plot_mir_terms()
is based on the tools available in the tidytext package.
Bar plot displaying the count of the top terms associated with a miRNA name.
plot_wordcloud()
, tidytext::unnest_tokens()
Other miR term functions:
plot_wordcloud()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.