title: Extract statistics from boxplot
body: <p>I've already tried searching but I've found nothing similar.
  I have a dataset containing temperatures, and another dataset containing 23 tipes of terrain (categorical variable).
  I have drawn a dataset of temperature versus type of terrain, seen a trend in this plot and now I want to extract statistics (i.e. median) from this plot.</p>
  
  <p>This is the code I used for drawing the boxplot:</p>
  
  <pre><code>boxplot(zone$tm_03 ~ ds3_utm$terr, col='chartreuse3', xlab='Terreno', ylab='Temperatura (°C)', varwidth=T)
  </code></pre>
  
  <p>And this is the boxplot I found:</p>
  
  <p><img src="https://i.stack.imgur.com/7T2JO.png" alt="Boxplot"></p>
  
  <p>What I'd like to do is to extract from the boxplot the value of the median for each category. I thought of using boxplot.stats(), but I didn't manage to make it work.</p>
  
  <pre><code>boxplot_stats&lt;-boxplot.stats(zone$tm_01 ~ ds3$terr)
  Error in x[floor(d)] + x[ceiling(d)] : 
    non numeric argument transformed in binary operator
  Inoltre: Warning messages:
  1: In is.na(x) :
  is.na() applied to non-(list or vector) of type 'language'
  2: In is.na(x) :
  is.na() applied to non-(list or vector) of type 'language'
  3: In is.na(x) :
  is.na() applied to non-(list or vector) of type 'language'
  </code></pre>
  
  <p>And summary():</p>
  
  <pre><code>&gt; summary(boxplot(zone$tm_03 ~ ds3_utm$terr, col='chartreuse3', xlab='Terreno', ylab='Temperatura (°C)', main='Marzo', varwidth=T))
  Errore in summary(boxplot(zone$tm_03 ~ ds3_utm$terr, col = "chartreuse3",  : 
    error in evaluating the argument 'object' in selecting a method for     function 'summary': Errore in eval(expr, envir, enclos) : oggetto "ds3_utm" not found.
  </code></pre>
  
  <p>Anyone can help me?</p>
  
  <p>Thanks in advance!</p>