I want to calculate how often specific words appear in different documents (similar to a sentiment analysis).
For this purpose, I've created a specific wordlist and I have stored all of my documents in a corpus and later in a DTM (Document-Term-matrix).
Now, I currently use the TM package in R using following formula:
Term.Frequency <- data.frame(tm_term_score(DTM.tfidf, Wordlist))
However, I am not really familiar with the technique used behind the formula, which is why I want to calculate the Term.Frequency myself. Additionally, the codes provides a score and not the total number of frequency.
I don't know how I can only calculate the frequency of the words in the wordlist though. Can anybody help me?