title: Problems to run stm for topic modelling with one single covariate
body: <p>I'm trying to run LDA topic modelling analysis with stm but I have problems with my meta data, it seems to work fine but I have a covariate (Age) that is not being read as shown in this example.</p>
  
  <p>I have some tweets (docu column in excel file) with an Age covariate (Young,Old) values..</p>
  
  <p>Here is my data
  <a href="http://www.mediafire.com/file/5eb9qe6gbg22o9i/dada.xlsx/file" rel="nofollow noreferrer">http://www.mediafire.com/file/5eb9qe6gbg22o9i/dada.xlsx/file</a></p>
  
  <pre><code>library(stm)
  library(readxl)
  library(quanteda)
  library(stringr)
  library(tm)
  
  
  data &lt;-  read_xlsx("C:/dada.xlsx") 
  
  #Remove URL's 
  data$docu &lt;- str_replace_all(data$docu, "https://t.co/[a-z,A-Z,0-9]*","")
  
  
  data$docu &lt;- gsub("@\\w+", " ", data$docu)  # Remove user names (all proper names if you're wise!)
  
  data$docu &lt;- iconv(data$docu, to = "ASCII", sub = " ")  # Convert to basic ASCII text to avoid silly characters
  data$docu &lt;- gsub("#\\w+", " ", data$docu)
  
  data$docu &lt;- gsub("http.+ |http.+$", " ", data$docu)  # Remove links
  
  data$docu &lt;- gsub("[[:punct:]]", " ", data$docu)  # Remove punctuation)
  
  data$docu&lt;-  gsub("[\r\n]", "", data$docu)
  
  data$docu &lt;- tolower(data$docu)
  
  
  
  #Remove Stopwords. "SMART" is in reference to english stopwords from the SMART information retrieval system and stopwords from other European Languages.
  data$docu &lt;- tm::removeWords(x = data$docu, c(stopwords(kind = "SMART")))
  
  data$docu &lt;- gsub(" +", " ", data$docu) # General spaces (should just do all whitespaces no?)
  
  myCorpus &lt;- corpus(data$docu)
  docvars(myCorpus, "Age") &lt;- as.factor(data$Age)
  
  
  processed &lt;- textProcessor(data$docu, metadata = data)
  
  out &lt;- prepDocuments(processed$documents, processed$vocab, processed$meta, lower.thresh = 2)
  
  out$documents
  out$meta
  levels(out$meta)
  
  First_STM &lt;- stm(documents = out$documents, vocab = out$vocab,
                   K = 4, prevalence =~ Age ,
                   max.em.its = 25, data = out$meta,
                   init.type = "LDA", verbose = FALSE)
  </code></pre>
  
  <p>As shown in the code I tried to define Age as factor, I think that is not needed because running <code>textProcessor</code> might be enough.. but nevertheless when I run 
  <code>levels(out$meta)</code> I get <code>NULL</code> value so when I then run <code>stm</code> to get the actual topics I get memory allocation error.. </p>