plot_mir_terms {miRetrieve} | R Documentation |
Plot count of top terms associated with a miRNA name
Description
Plot count of top terms associated with a miRNA name.
Usage
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
)
Arguments
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. |
Details
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.
Value
Bar plot displaying the count of the top terms associated with a miRNA name.
See Also
plot_wordcloud()
, tidytext::unnest_tokens()
Other miR term functions:
plot_wordcloud()