Wrapper around Python BERTopic.visualize_distribution(). This function
takes a single document's topic probability vector (e.g., one row from
probs) and returns an interactive Plotly figure as HTML or writes it
to disk.
bertopic_visualize_distribution(
model,
probs,
min_probability = NULL,
custom_labels = FALSE,
title = NULL,
width = NULL,
height = NULL,
file = NULL
)If file is NULL, an htmltools::HTML object. Otherwise, the
normalized file path is returned invisibly.
A "bertopic_r" model.
Numeric vector of topic probabilities for a single document.
Optional numeric scalar. If provided, only
probabilities greater than this value are visualized (forwarded to
min_probability in Python).
Logical or character scalar. If logical, whether to
use custom topic labels as set via set_topic_labels(). If character,
selects labels from other aspects (e.g., "Aspect1").
Optional character plot title.
Optional integer figure width/height in pixels.
Optional HTML output path. If NULL, an htmltools::HTML
object is returned.