title: How to call expression result after paste command in R?
body: <p>I want to get a cell value after dynamically passing its address. So I am trying paste command to join the address of the cell like following:</p>
  
  <pre><code>paste0("DT1$", eval(cols[1]),"[1]")
  </code></pre>
  
  <p>where DT1 is datatable, cols[1] is refering to 1 column and [1] is first row of that column. While running this I am getting the string(address of the cell):</p>
  
  <pre><code>&gt; paste0("DT1$", eval(cols[1]),"[1]")
  [1] "DT1$BCC1[1]"
  </code></pre>
  
  <p>But I want the value of the cell like if I run:</p>
  
  <pre><code>&gt; DT1$BCC1[1]
  [1] 0
  </code></pre>
  
  <p>So how to run call the result of the paste expression to get value of cell like "0" in previous example. I tried eval() and do.call(), but nothing seems to be working. I am sorry for this basic question as I am new to R. Any help is really appreciated.</p>