kbenoit / LIWCalike

R package to extend quanteda to mimic LIWC
37 stars 6 forks source link

error when using liwcalike() on large columns of text #4

Open brucedore opened 7 years ago

brucedore commented 7 years ago

Hi!

Thanks for writing this awesome package!

It is generally working for me, but for certain large columns of cells containing text I am getting the following error:

Error in as.data.frame.default(dfmDict/rep(result[["WC"]], each = nfeature(dfmDict)), : cannot coerce class "structure("dgCMatrix", package = "Matrix")" to a data.frame

Other columns of the same size run without error, and smaller columns never generate this error.

kbenoit commented 7 years ago

Thanks!

Can you send me a link to some document, so I can reproduce the problem?

brucedore commented 7 years ago

Hi Kenneth, I don't currently have permission to share the data. I was able to process the text that previously drew the above error by running the liwcalike.R source code one line at a time. This was slow (I am processing 1.5 million cells of text) but ran without error, so not sure exactly what was causing the error when calling the liwcalike() wrapper.

kbenoit commented 7 years ago

I just ran some tests and update the package. Please reinstall, and make sure you have quanteda v0.99 installed, and try it again.

If it still fails, please post your sessionInfo() output and the exact log showing the steps that led to the error.