title: element in R dataframe good practice
body: <p>Accessing the <code>i</code>th element in the column <code>bar</code> in the dataframe <code>foo</code> in R can be done in two different ways:</p>
  
  <p><code>foo[i,"bar"]</code></p>
  
  <p>and</p>
  
  <p><code>foo$bar[i]</code>.</p>
  
  <p>Is there any difference between them? If so, which one should be used in terms of efficiency, readability, etc.?</p>
  
  <p>Apologies if this has already been asked, but <code>[]</code> and  <code>$</code> characters are very elusive.</p>