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
Examples
dubliners <- get_gutenberg_corpus(2814) |>
load_texts() |>
identify_by(part) |>
standardize_titles()
dubliners |>
plot_tf_idf()
