document_term_frequencies(x, document = <span class="hljs-string">"topic_level_id"</span>, term = <span class="hljs-string">"term"</span>)
dtm &lt;- document_term_matrix(x = dtm)
dtm &lt;- dtm_remove_lowfreq(dtm, minfreq = <span class="hljs-number">5</span>)
</code></pre>
<p>Once we have our document/term/matrix, topic modelling is simple. Keep in mind that you need to tune your topic model, which is not done below. See the topicmodels and ldatuning R package which show you how to do that.</p>
<pre><code cl