title: Using na.rm=T in pmin with do.call
body: <p>I want to extract the minimum value of each element of several matrix that are stored inside a list. I'm using pmin:</p>
  
  <pre><code>do.call(pmin, mylist)
  </code></pre>
  
  <p>The problem is that some elements of those matrix are NAs, and pmin yields a NA where I want it to yield the minimum value after excluding the NAs. I tried to solve my problem using 
      do.call(pmin(na.rm=T), mylist)</p>
  
  <p>but I get an error. I also tried with this answer: <a href="https://stackoverflow.com/questions/35778954/data-table-and-pmin-with-na-rm-true-argument">data.table and pmin with na.rm=TRUE argument</a>, but I get the error because .SD is not on the environment. 
  Simple code for a similar problem would be:</p>
  
  <pre><code>mymat1 &lt;- matrix(rnorm(10), ncol=2)
  
  mymat2 &lt;- matrix(rnorm(10), ncol=2)
  mymat2[2,2] &lt;- NA
  
  mymat3 &lt;- matrix(rnorm(10), ncol=2)
  
  mylist &lt;- list(mymat1, mymat2, mymat3)
  
  do.call(pmin, mylist)
  </code></pre>
  
  <p>I get a NA in the position [2,2] of the resulting matrix, and I want to get the minimum values ignoring NAs.
  Any suggestions?
  Thank you.</p>