title: R List subsetting using "[[" shows error subscript out of bounds
body: <p>I was trying to subset a large list with 278226 elements and each element (shown as below) is also a list which has a number(between 39 and 50) of sub-elements(size 1 atomic vector with different names). </p>
  
  <pre><code>&gt; str(listings_England[9922])
  List of 1
   $ listing:List of 40
    ..$ agent_address       : chr "35 John Street, Luton"
    ..$ agent_logo          : chr "https://st.zoocdn.com/zoopla_static_agent_logo_(257607).png"
    ..$ agent_name          : chr "Ashton Carter Homes"
    ..$ agent_phone         : chr "020 8115 4543"
    ..$ category            : chr "Residential"
    ..$ country             : NULL
    ..$ country_code        : chr "gb"
    ..$ county              : NULL
    ..$ displayable_address : chr "Hatters Way Luton, Luton LU1"
    ..$ first_published_date: chr "2017-11-16 17:25:36"
    ..$ last_published_date : chr "2018-01-29 18:40:52"
    ..$ latitude            : chr "51.88188"
    ..$ listing_id          : chr "39336869"
    ..$ listing_status      : chr "sale"
    ..$ longitude           : chr "-0.43237194"
  </code></pre>
  
  <p>Then I extract sub-elements such as "<em>listing_id</em>" as below:</p>
  
  <pre><code>&gt; id1 &lt;- sapply(listings_England, "[[", "listing_id")
  Error in FUN(X[[i]], ...) : subscript out of bounds
  &gt; id3 &lt;- sapply(listings_England[1:100000], "[[", "listing_id")
  Error in FUN(X[[i]], ...) : subscript out of bounds
  &gt; id2 &lt;- sapply(listings_England[1:50000], "[[", "listing_id")
  &gt; 
  
  &gt; listings_England$listing_id
  NULL
  &gt; 
  </code></pre>
  
  <p>As you can see, it only works for the last one (same problem for the <strong>purrr::map</strong> family functions). I was wondering if it the limitation of these functions. And my current solution is:</p>
  
  <pre><code>id &lt;- sapply(listings_England, function(x) x["listing_id"]) %&gt;% as.numeric()
  </code></pre>
  
  <p><strong>The problem here is "[[" or "$" function is not working for this large list, and only "[" works.</strong></p>