Data Frame Error in R (stm package)

I am trying to analyze a csv file on r using the structural topic modeling package; however, I keep receiving an error when I try to process the spreadsheet.

The code I enter before the error is the following:

library (stm)
data = read.csv ("~/Desktop/NEWBILLS REVISED.csv")
processed = textProcessor(data$documents, metadata = data)

Here is the error:
Error in [<*tmp*, , tag, value = 1:1841) :
replacement has 1841 rows, data has 0

Is there any way I can fix this? Does it have to do with my spreadsheet or is it something in R? I have tried a sample spreadsheet given with the stm package and it works with that so is there something I need to do with my spread sheet? Thanks.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.