inst/doc/basic_usage.R

## ---- include = FALSE----------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## ----example_setup-------------------------------------------------------
library(topicdoc)
library(topicmodels)

data("AssociatedPress")

lda_ap4 <- LDA(AssociatedPress,
               control = list(seed = 33), k = 4)

# See the top 10 terms associated with each of the topics
terms(lda_ap4, 10)

## ----all_at_once---------------------------------------------------------
topic_diagnostics(lda_ap4, AssociatedPress)

## ----one_at_a_time-------------------------------------------------------
topic_size(lda_ap4)
mean_token_length(lda_ap4)

Try the topicdoc package in your browser

Any scripts or data that you put into this service are public.

topicdoc documentation built on Oct. 30, 2019, 11:26 a.m.