title: How to populate/fill a dataframe column with cell values of another dataframe
body: <p>I have two dataframes </p>
  
  <p><a href="https://i.stack.imgur.com/2k7kS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2k7kS.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/cjvCd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cjvCd.png" alt="enter image description here"></a></p>
  
  <p>dataframe 1 has around million rows.. and its has two columns named 'row' and 'columns' that has the index of row and column of another dataframe (i.e. dataframe 2).. </p>
  
  <p>i want to extract the values from dataframe 2 with the indexes stated in the columns named 'row' and 'columns' for each row in dataframe1. </p>
  
  <p>I used a simple <strong>for loop</strong> to get the solution but it is time consuming and takes around 9 minutes, is there any other way with functions in R to solve this problem?</p>
  
  <blockquote>
  <pre><code>for(i in 1:nrow(datafram1)) {
    dataframe1$value[i] = dataframe2[dataframe1$row[i],dataframe1$columns[i]]
  }
  </code></pre>
  </blockquote>