title: code to extracting a single entry from a column in a Dataframe in R, which should be a list and not a number
body: <p>I have a question in Data Camp for an R course I'm doing.</p>
  
  <p>Question:
  Find the 1,031st entry of the passenger_count column and save the value under the name passenger_count_1031.</p>
  
  <p>I get an incorrect submission message:
  "The contents of the variable passenger_count_1031 aren't correct. It is a number, while it should be a list."</p>
  
  <p>The 'passenger_count' column consists of thousands of single number entries/integers, that is in a data frame 'taxis'.</p>
  
  <p>I get the correct answer, but clearly, it's not what it wants. I've tried various versions.</p>
  
  <p>I tried:</p>
  
  <pre><code>    passenger_count_1031 &lt;- taxis["passenger_count"][1031]  (doesn't work)
      passenger_count_1031 &lt;- taxis[passenger_count[1031]]    (doesn't work)
      passenger_count_1031 &lt;- taxis[[passenger_count]][[1031]](doesn't work)
      passenger_count_1031 &lt;- taxis[taxis$passenger_count][1031] (gives you the whole list on the column, not what they want)
      passenger_count_1031 &lt;- taxis$passenger_count[[1031]] (get the same incorrect submission message)
  </code></pre>
  
  <p>this is my code:</p>
  
  <pre><code>    passenger_count_1031 &lt;- taxis$passenger_count[1031]
  </code></pre>
  
  <p>I expect the answer should be just a single value, which I get:</p>
  
  <pre><code>    &gt; passenger_count_1031
      [1] 1
  </code></pre>
  
  <p>It is an integer. So why is it asking for a list?</p>