Show hapax introduction ratio over time
Usage
plot_hir(
data,
x = progress,
by = doc_id,
identity = doc_id,
descriptive_labels = TRUE,
labeling = c("point", "inline", "inset"),
log_y = TRUE
)Arguments
- data
A tidy data frame, potentially containing a column called "doc_id" and "word"
- x
A column showing the cumulative progress of documents
- by
A grouping column for colors and labels
- identity
A grouping column for lines
- descriptive_labels
A toggle for disabling descriptive labels of progress_percent on the X-axis
- labeling
Options for labeling groups:
"point"labels the final value"inline"prints the label within a smoothed curve"inset"prints a legend within the plot areaAnything else prints a legend to the right of the plot area.
- log_y
A toggle for logarithmic scaling to the Y-axis; defaults to TRUE
Examples
if (FALSE) { # \dontrun{
dubliners <- get_gutenberg_corpus(2814) |>
load_texts() |>
identify_by(part) |>
standardize_titles()
dubliners_measured <- dubliners |>
add_vocabulary()
dubliners_measured |>
standardize_titles() |>
plot_hir()
} # }
