title: Multiple aggregation in R with 4 parameters
body: <p>I have four vectors (columns) </p>
  
  <pre><code> x y z  t
   1 1 1 10
   1 1 1 15
   2 4 1 14
   2 3 1 15
   2 2 1 17
   2 1 2 19
   1 4 2 18
   1 4 2 NA
   2 2 2 45
   3 3 2 NA
   3 1 3 59
   4 3 3 23
   1 4 3 45
   4 4 4 74
   2 1 4 86
  </code></pre>
  
  <p>How can I calculate mean and median of vector t, for each value of vector y (from 1 to 4) where x=1, z=1,  using aggregate function in R?</p>
  
  <p>It was discussed how to do it with 3 parameters (<a href="https://stackoverflow.com/questions/24215817/multiple-aggregation-in-r">Multiple Aggregation in R</a>) but it`s a little unclear how to do it with 4 parameters.</p>
  
  <p>Thank you.</p>