Analysis of moods includes a wide category of methods designed to measure positive and negative moods from the text, so this is a rather difficult question to answer simply. But here is a simple answer: you can apply the dictionary to your matrix of documents and then combine the positive and negative key categories of your dictionary to create a measure of mood.
I suggest trying this in the quanteda text analysis package, which processes many existing dictionary formats and allows you to create very flexible user dictionaries.
For instance:
require(quanteda) mycorpus <- subset(inaugCorpus, Year>1980) mydict <- dictionary(list(negative = c("detriment*", "bad*", "awful*", "terrib*", "horribl*"), postive = c("good", "great", "super*", "excellent"))) myDfm <- dfm(mycorpus, dictionary = mydict)
For your enclosure, assuming you are in a data.frame file called data , you can create a quanteda enclosure using:
mycorpus <- corpus(data$Content, docvars = data[, 1:2])
See also ?textfile for loading contents from files in one simple command. This works, for example, with .csv files, although you will have problems with this file because the "Content" field contains text containing commas.
There are many other ways to measure feelings, of course, but if you are new to Mining and R, this should get you started. You can learn more about mining methods (and apologies if you have already encountered them):