title: converting list of terms as nodes for network graph in r
body: <p>i want to build a term graph for short texts,<br>
  </p>
  
  <pre><code>getwd()
  d1&lt;-"C:/Users/PGLAB/Documents/abc.txt"
  d&lt;-readLines(d1)
  &gt; d
      [1] "april paris lyrics"               "vacation april paris"            
  
      [3] "book disneyland hotel california" "watch harrypotter"
  </code></pre>
  
  <h1>tokenize the texts</h1>
  
  <pre><code>dd&lt;-as.list(tokenize_words(d))
  &gt;dd
     [[1]]
     [1] "april"  "paris"  "lyrics"
  
     [[2]]
     [1] "vacation" "april"    "paris"   
  
     [[3]]
     [1] "book"       "disneyland" "hotel"      "california"
  
     [[4]]
     [1] "watch"       "harrypotter"
  
  dds&lt;-as.list(dd[[1]])
     [[1]]
     [1] "april"
  
     [[2]]
     [1] "paris"
  
     [[3]]
     [1] "lyrics"
  </code></pre>
  
  <p>now i want to make each term("april","paris","lyrics") as nodes and edges for all nodes.
  i tried with TermDocumentMatrix and adjacency matrix,but it doesn't work properly,suggestions are welcome</p>