0

I am running a R script for topic modelling through remote on server of university, using MobaXterm to interact with Linux SSH.

I can run all commands of my script, and upload most packages there, but s() function is not read, it will stop the script to be run on the server. I use stm package, the s() function is to catch the curve of how the topic proportion changes between time point, that would be my final aim.

I tested the script with and without s() function, only when s() function is included it cannot be run, I can run with s() function with no problems on my laptop with another operating system. So I understand the problem is Linux not reading s() somehow.

Here an example of the code

stm(out$documents, out$vocab, K = 20, prevalence =~ rating + s(day), content =~ rating, max.em.its = 75, data = out$meta, init.type = "Spectral") 

Any tip on what could be the problem and how to correct?

TylerH
  • 20,799
  • 66
  • 75
  • 101

0 Answers0