rlsa

How to access individual documents in textmatrix in R


I have a textmatrix in R that looks like the following:

textmatrix

I am trying to create one textmatrix from training and testing data. How can I access the different document columns to put into another textmatrix?


Solution

  • The only way I've found to do it so far is to access it by subscript, i.e. testingSpace[,i]

    Still not sure why testingSpace$matrix doesn't seem to exist, so if anyone knows, please let me know.