I'm currently learning my ways around R and Im troubled by the following problem:
Ive got a dataframe that is build up like this
word freq1 freq2
tree 10 20
this 2 3
that 4 5
...
It shows the frequency in which the word is used in text 1 (freq1) and text 2 (freq2). Is it possible to transform this to a term-document-matrix? I need it to be a term-document-matrix to apply the following function
par(mfrow=c(1,1))
comparison.cloud(tdm, random.order=FALSE, colors =
c("indianred3","lightsteelblue3"),
title.size=2.5, max.words=400)
from https://rpubs.com/brandonkopp/creating-word-clouds-in-r
Thanks :)