title: Making a simple wordcloud in R
body: <pre><code>#Loading Packages
  
  library(tm)
  library(wordcloud)
  
  library(RColorBrewer)
  
  speech="/Users/GregDuncan/Desktop/bills.txt"
  modi_txt = readLines(speech)
  
  
  modi&lt;-Corpus(VectorSource(modi_txt))
  
  
  modi_data&lt;-tm_map(modi,stripWhitespace)
  
  modi_data&lt;-tm_map(modi_data,tolower)
  
  modi_data&lt;-tm_map(modi_data,removeNumbers)
  
  modi_data&lt;-tm_map(modi_data,removePunctuation)
  
  modi_data&lt;-tm_map(modi_data,removeWords, stopwords(“english”))
  
  
  tdm_modi&lt;-TermDocumentMatrix (modi_data) #Creates a TDM
  
  TDM1&lt;-as.matrix(tdm_modi) #Convert this into a matrix format
  
  v = sort(rowSums(TDM1), decreasing = TRUE) #Gives you the frequencies for every word
  
  Summary(v)
  
  
  
  wordcloud (modi_data, scale=c(5,0.5), max.words=1, random.order=FALSE, rot.per=0.35, use.r.layout=FALSE, colors=brewer.pal(8, “Dark2″))
  </code></pre>
  
  <p>So I'm trying to make a word cloud out of a document. I'm trying to run it with Rscript and I run into a issue such as this</p>
  
  <pre><code>  enter Error: unexpected input in "modi_data&lt;-tm_map(modi_data,removeWords, stopwords(?"
  Execution haltedcode here
  </code></pre>
  
  <p>and </p>
  
  <pre><code>   unexpected input in "wordcloud (modi_data, scale=c(5,0.5), max.words=1, random.order=FALSE, rot.per=0.35, use.r.layout=FALSE, colors=brewer.pal(8, �"
  </code></pre>
  
  <p>I'm pretty new to R, so I'm trying to just learn the basics. I don't know if someone with more experience can see the issue quickly </p>