title: create a new column that arrange data frame order based on previous columns
body: <p>i have a data frame like this:</p>
  
  <pre><code>  A     B      C    
  1   1   1 0.4519
  2 101   1 0.3819
  3 201   1 0.3819
  4 301   1 0.2819
  5 401   1 0.9819
  6 501   1 0.6819
  </code></pre>
  
  <p>it's larger but that's an example.</p>
  
  <p>i want to create a new column called <code>order</code> which include a number from <code>(1 until nrow(df))</code> and it increase based on the value of the <code>C</code> column (1 for smallest value and increase with increasing <code>C</code> value). and when the values in column C are equal change the ordering criteria to column <code>A</code> and when the values in column A are equal, change it to column <code>B</code>.</p>
  
  <p>is this can be done in R in an easy and efficient way?</p>
  
  <p>this can be done using a for loop on the data frame and make some if statement, but it will take to much time to finish. that's why i need a faster alternative if possible</p>
  
  <p>thank you</p>