title: Group a data frame by quartiles of an individual variable contained in the data frame
body: <p>I have the <em>swiss</em> data set provided by R, which has the following form:</p>
  
  <pre><code>            Fertility Agriculture Examination Education Catholic Infant.Mortality
  Courtelary       80.2        17.0          15        12     9.96             22.2
  Delemont         83.1        45.1           6         9    84.84             22.2
  Franches-Mnt     92.5        39.7           5         5    93.40             20.2
      .              .           .            .         .      .                 . 
      .              .           .            .         .      .                 . 
      .              .           .            .         .      .                 . 
  
  V. De Geneve     35.0         1.2          37        53    42.34             18.0
  Rive Droite      44.7        46.6          16        29    50.43             18.2
  Rive Gauche      42.8        27.7          22        29    58.33             19.3
  </code></pre>
  
  <p>And I would like to know if there is a simple or easy way to classify the data in four groups, one for each quartile of the <em>Education</em> variable and then get the corresponding <em>Infant.Mortality</em> for each province, so I can get something like:</p>
  
  <pre><code>       Group1stQ           Group1stQ           Group1stQ          Group1stQ 
  
     &lt;Mortality for      &lt;Mortality for       &lt;Mortality for     &lt;Mortality for
       1st province        1st province         1st province       1st province
       on this group&gt;     on this group&gt;       on this group&gt;     on this group&gt;
  
     &lt;Mortality for      &lt;Mortality for       &lt;Mortality for     &lt;Mortality for
       2nd province        2nd province         2nd province       2nd province
       on this group&gt;     on this group&gt;       on this group&gt;     on this group&gt;
  
     &lt;Mortality for      &lt;Mortality for       &lt;Mortality for     &lt;Mortality for
       3rd province        3rd province         3rd province       3rd province
       on this group&gt;     on this group&gt;       on this group&gt;     on this group&gt;
            .                  .                    .                  .
            .                  .                    .                  .
            .                  .                    .                  .
  </code></pre>
  
  <p>Thanks in advance for your help!!!</p>