I am using tm package for text mining in R. I performed following steps:
Import the data in R system and Creating Text Corpus
dataorg <- read.csv("Report_2014.csv")
corpus <- Corpus(VectorSource(data$Resolution))
Clean the data
mystopwords <- c("through","might","much","had","got","with","these")
cleanset <- tm_map(corpus, removeWords, mystopwords)
cleanset <- tm_map(cleanset, tolower)
cleanset <- tm_map(cleanset, removePunctuation)
cleanset <- tm_map(cleanset, removeNumbers)
Creating Term Document Matrix
tdm <- TermDocumentMatrix(cleanset)
At this point I export the TDM data into csv in order to perform some manual cleansing of the terms
write.csv(inspect(tdm), file="tdmfile.csv")
Now the problem is that I want to bring back the cleaned tdm csv file into R system and perform further text analysis like clustering, frequency analysis. But I am not able to convert the csv file back into corpus format acceptable by tm package algorithms so I am not able to proceed further with my text analysis.
It would be really helpful if somebody can help me out to convert cleaned csv file into corpus format which is acceptable by text analysis functions of tm package.