title: How can I manually enter a value in R?
body: <p>I am trying to enter a date of birth value on a dataset of senators. I rarely touch for loops so I may be doing this wrong but this is what I have so far:</p>
  <pre><code>    ID &lt;- c(&quot;A000055&quot;,&quot;B001303&quot;,&quot;M001201&quot;)
      D.O.B. &lt;- c(&quot;1965-07-22&quot;,NA,&quot;1951-11-07&quot;)
      leg_complete &lt;- data.frame(&quot;name&quot;,&quot;D.O.B.&quot;)
  
  for(id in leg_complete)
    if(ID==&quot;M001201&quot;) {
      D.O.B. &lt;- &quot;1956-11-14&quot;
    } else {
      break
    }
  </code></pre>
  <p>Whenever I run the code and open the dataset, I get &quot;No data available in the table. Is the for loop even the best move for entering a single value or should I use a different function?</p>