topic_series: Topic time series

topic_seriesR Documentation

Topic time series

Description

Generate a data frame with topics over time (based on document metadata). Since it is frequently useful to look at time series of topics, this function provides a short-cut for generating a data frame in a format suitable for plotting from the information contained in a model.

Usage

topic_series(m, breaks = "years")

Arguments

m

mallet_model object

breaks

passed on to cut.Date: what interval should the time series use?

Details

Topic weights are smoothed with the estimated hyperparameter β before summing and normalizing.

See the package vignette for an example of this function in use.

Value

a data frame with three columns, topic, pubdate, weight. The weights are normalized to sum to 1 in each time period.


agoldst/dfrtopics documentation built on July 15, 2022, 4:13 p.m.