title: Sort data frame by two columns (with condition)
body: <p>I have the following data frame in R:</p>
  
  <pre><code>DataTable &lt;- data.frame( Name = c("Nelle","Alex","Thomas","Jeff","Rodger","Michi"), Age = c(17, 18, 18, 16, 16, 16), Grade = c(1,5,3,2,2,4) )
  
      Name Age Grade
  1  Nelle  17     1
  2   Alex  18     5
  3 Thomas  18     3
  4   Jeff  16     2
  5 Rodger  16     2
  6  Michi  16     4
  </code></pre>
  
  <p>Now ill will sort this data frame by its <code>Age</code> column. No problem so far:</p>
  
  <pre><code>DataTable_sort_age &lt;- DataTable[with(DataTable, order(DataTable[,2])),]
  
      Name Age Grade
  4   Jeff  16     2
  5 Rodger  16     2
  6  Michi  16     4
  1  Nelle  17     1
  2   Alex  18     5
  3 Thomas  18     3
  </code></pre>
  
  <p>There are more persons in the <code>Name</code> columns that have the same age and they should be sorted alphabetically. If the condition, that more than one person is at the same age, is true the data frame should be sorted alphabetically by <code>Name</code>. The output should look like this:</p>
  
  <pre><code>    Name Age Grade
  1   Jeff  16     2
  2  Michi  16     2
  3 Rodger  16     4
  4  Nelle  17     1
  5   Alex  18     5
  6 Thomas  18     3
  </code></pre>
  
  <p>Hope you can help me by sorting the data frame alphabetically.</p>