In this question I asked how to split a huge dataframe to create a corpus. Thanks to the answer I was able to create a list from a dataframe. My problem was still obtaining a corpus from the list I created in order to do some text mining and cluster the data according to the search term.
To solve this problem I just applied the as.VCorpus function of the tm package to the list I created before:
new_corpus <- as.VCorpus(new_list)
Check if the new object is a corpus:
class(new_corpus)
[1] "VCorpus" "Corpus"
I thus created a "volatile corpus". As written in the R documentation:
A volatile corpus is fully kept in memory and thus all changes only affect the corresponding R object.
来源:https://stackoverflow.com/questions/34061912/how-transform-a-list-into-a-corpus-in-r