title: Sort columns of a dataframe by column name
body: <p>This is possibly a simple question, but I do not know how to order columns alphabetically.</p>
  
  <pre><code>test = data.frame(C = c(0, 2, 4, 7, 8), A = c(4, 2, 4, 7, 8), B = c(1, 3, 8, 3, 2))
  
  #   C A B
  # 1 0 4 1
  # 2 2 2 3
  # 3 4 4 8
  # 4 7 7 3
  # 5 8 8 2
  </code></pre>
  
  <p>I like to order the columns by column names alphabetically, to achieve </p>
  
  <pre><code>#   A B C
  # 1 4 1 0
  # 2 2 3 2
  # 3 4 8 4
  # 4 7 3 7
  # 5 8 2 8
  </code></pre>
  
  <p>For others I want my own defined order:</p>
  
  <pre><code>#   B A C
  # 1 4 1 0
  # 2 2 3 2
  # 3 4 8 4
  # 4 7 3 7
  # 5 8 2 8
  </code></pre>
  
  <p>Please note that my datasets are huge, with 10000 variables. So the process needs to be more automated.</p>