title: lapply, difference between c() and list()
body: <p>What is the difference between c() and list()? 
  I'm learning some webscraping and ran into an unexpected error. 
  I wrote a small script to scrape baseball data from a few pages on ESPN's website:</p>
  
  <pre><code>library(magrittr)
  library(rvest)
  
  Baseball &lt;- read_html("http://www.espn.com/mlb/stats/batting/_/qualified/true")
  Baseball.2 &lt;- read_html("http://www.espn.com/mlb/stats/batting/_/count/41/qualified/true")
  Baseball.3 &lt;- read_html("http://www.espn.com/mlb/stats/batting/_/count/81/qualified/true")
  Baseball.4 &lt;- read_html("http://www.espn.com/mlb/stats/batting/_/count/121/qualified/true")
  Baseball.list &lt;- c(Baseball, Baseball.2, Baseball.3, Baseball.4)
  
  
  scrape &lt;- function(html) {
    temp.df &lt;- data.frame(1:length(html %&gt;%
                                     html_nodes(paste0("td:nth-child(2)")) %&gt;%
                                     html_text()))
    for (i in 2:19) {
    temp.df[i - 1] &lt;- 
      html %&gt;%
      html_nodes(paste0("td:nth-child(", i, ")")) %&gt;%
      html_text()
    }
    temp.df
  }
  </code></pre>
  
  <p>when I run <code>df &lt;- lapply(Baseball.list, scrape)</code> I get:</p>
  
  <pre><code>Error in UseMethod("xml_find_all") : 
    no applicable method for 'xml_find_all' applied to an object of class "externalptr" 
  </code></pre>
  
  <p>But, if I run <code>Baseball.list &lt;- list(Baseball, Baseball.2, Baseball.3, Baseball.4)</code> and then use lapply and my function in the exact same way it works without a problem! I checked the documentation for <code>c()</code> and see that:
   "This is a generic function which combines its arguments.
  The default method combines its arguments to form a vector. All arguments are coerced to a common type which is the type of the returned value, and all attributes except names are removed," whereas the documentation for <code>list()</code>says its coerces objects into a list. Can someone explain why using <code>c()</code> in this instance causes lapply to fail? I'm not understanding the documentation. </p>