HI , I would like to do stemming operation on vector of words using tm package. I am using R 2.8.1 and tm package for same. For doing any operations i tm package the data first needs to be converted to corpus and then use various commands in tm package. No problem is I am not able to convert these processed corpus into a dataframe/ vector. I am using following commands for the same.
library(tm) docs <- c("mining","miners") s = Corpus(VectorSource(docs)) b = tmMap(s, stemDoc) inspect(b) By inspect command I am able to view the desired output but cannot convert it into dataframeor any other datastructure for further usage. Inspect command produces following output : A corpus with 2 text documents The metadata consists of 2 tag-value pairs and a data frame Available tags are: create_date creator Available variables in the data frame are: MetaID [[1]] [1] mine [[2]] [1] miner I need only results 'mine' , 'miner' in a vector. Please help -- View this message in context: http://r.789695.n4.nabble.com/Converting-corpus-into-dataframe-in-r-tm-package-tp4688081.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.