Skip to contents

Quickly rename the topics of the top_terms charts

Usage

top_terms_rename(new_names)

Arguments

new_names

A vector of new names, should be the same length as k. i.e. you'll need one new name for each plot.

Value

ggplot object with names changed

Examples

explore <- SegmentR:::test_data(bigrams = FALSE)$explore[1, ]
#> removing stopwords
#> Making DTMs
#> making tuning grid
#> setting up LDAs

plot <- explore %>%
  purrr::pluck('top_terms', 1, 2)

new_names <- c("New Topic 1", "New Topic 2", "New Topic 3")

plot + top_terms_rename(new_names)