Visualize the top terms by tf-idf
Usage
plot_tf_idf(
df,
rows = 1:10,
by = doc_id,
feature = word,
label = FALSE,
label_tweak = 2,
label_inside = FALSE
)
Arguments
- df
A tidy data frame, potentially containing columns called "doc_id" and "word"
- rows
The rows of terms to chart in each document
- by
A column containing document grouping
- feature
A column containing the terms to be measured across document groupings
- label
Not yet working
- label_tweak
Not yet working
- label_inside
Not yet working
See also
Other visualizing helpers:
change_colors()
,
plot_bigrams()
,
plot_doc_word_bars()
,
plot_doc_word_heatmap()
,
plot_hapax()
,
plot_htr()
,
plot_topic_bars()
,
plot_topic_distributions()
,
plot_topic_wordcloud()
,
plot_ttr()
,
plot_vocabulary()
,
visualize()
Examples
dubliners <- get_gutenberg_corpus(2814) |>
load_texts() |>
identify_by(part) |>
standardize_titles()
dubliners |>
plot_tf_idf()