title: Excluding NAs from computing a raster mosaic
body: <p>Unfortunately as I dont have enough reputation (and cannot comment on that topic) I have to ask a simple question to an already existing problem. I was computing a raster mosaic in R and stuck to this process: <a href="https://stackoverflow.com/questions/15287807/how-can-i-create-raster-mosaic-using-list-of-rasters">How can I create raster mosaic using list of rasters?</a> (Thanks a lot for that!). </p>
  
  <p>My only problem is, that I want to compute it either using the median or mean <strong>but</strong> exluding my NAs. 
  I am sorry but I didn't manage to include it into the existing code:</p>
  
  <pre><code>b1_listargs &lt;- b1_unstack
  b1_listargs$fun &lt;- mean
  b1_mosaic &lt;- do.call(mosaic, b1_listargs)
  </code></pre>
  
  <p>As I understand the function from above  it doesn't exclude NAs automatically. So given the <code>mean</code> of <code>c(4,4,4,4,NA)</code> my computed value would turn out to be <code>NA</code> - that's not useful to me as an output...</p>
  
  <p>Thanks for your help!</p>