title: taking average by groups, excluding NA value
body: <p>I'm struggling with finding something to aggregate my data frame by taking the mean and ignoring the NA value, but the end results would still show a missing value them. 
  the data table looks for instance like this     </p>
  
  <pre><code>Guar1   Bucket2 1   2   3   4   Total   Month
  10  -10 NA  NA  NA  NA  0   201110
  10  -0.2    0   9.87    8.42    0   18.29   201110
  10  0   0.81    7.49    3.32    5.92    17.54   201110
  10  0.4 0   0   NA  0   0   201110
  10  999 0.73    7.57    4.61    0.77    13.68   201110
  20  -10 NA  NA  NA  NA  0   201110
  20  -0.2    NA  NA  100 NA  100 201110
  20  0   NA  0   0   0   0   201110
  20  0.4 1.39    3.13    14.04   2.98    21.54   201110
  20  999 1.38    3.11    17.08   2.97    24.54   201110
  999 999 1.06    5.44    8.61    1.52    16.63   201110
  10  -10 NA  NA  NA  NA  0   201111
  10  -0.2    0   0   8.54    0   8.54    201111
  10  0   1.87    6.12    16.6    0   24.59   201111
  10  0.4 0   0   0   1.47    1.47    201111
  10  999 1.68    5.82    13.15   1.67    22.32   201111
  20  -10 NA  NA  NA  NA  0   201111
  20  -0.2    NA  0   NA  NA  0   201111
  20  0   NA  NA  0   0   0   201111
  20  0.4 2.29    5.38    14.91   14.18   36.76   201111
  20  999 2.29    5.35    13.09   14.1    34.83   201111
  </code></pre>
  
  <p>And the final table</p>
  
  <pre><code>Guar1   Bucket2 1   2   3   4   Total
  10  -10 NA  NA  NA  NA  0
  10  -0.2    0   4.935   8.48    0   13.415
  10  0   1.34    6.805   9.96    2.96    21.065
  10  0.4 0   0   0   0.735   0.735
  10  999 1.205   6.695   8.88    1.22    18
  20  -10 NA  NA  NA  NA  0
  20  -0.2    NA  0   100 NA  50
  20  0   NA  0   0   0   0
  20  0.4 1.84    4.255   14.475  8.58    29.15
  20  999 1.835   4.23    15.085  8.535   29.685
  999 999 1.06    5.44    8.61    1.52    16.63
  </code></pre>
  
  <p>I've try the </p>
  
  <pre><code>aggregate(.~ Guar1+Bucket2, df, mean, na.rm = FALSE)
  </code></pre>
  
  <p>but it then excluding all NA in the final table.</p>
  
  <p>and if I set all the NA value in df equal to 0 then I would not have the desire average.</p>
  
  <p>I hope that someone can help me with this. Thanks! </p>