title: Sorting dates by semesters in R
body: <p>I would like to sort (and rearrange) columns in a tibble object.  The table (let's call it <code>dataSet</code>) that I am working with looks like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Fall 2019</th>
  <th>Fall 2020</th>
  <th>Spring 2019</th>
  <th>Spring 2020</th>
  <th>Spring 2021</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>36</td>
  <td>32</td>
  <td>43</td>
  <td>25</td>
  </tr>
  <tr>
  <td>15</td>
  <td>84</td>
  <td>94</td>
  <td>64</td>
  <td>65</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I would like to have it sorted in the following order.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Spring 2019</th>
  <th>Fall 2019</th>
  <th>Spring 2020</th>
  <th>Fall 2020</th>
  <th>Spring 2021</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>32</td>
  <td>1</td>
  <td>43</td>
  <td>36</td>
  <td>25</td>
  </tr>
  <tr>
  <td>94</td>
  <td>15</td>
  <td>64</td>
  <td>84</td>
  <td>65</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Since the columns are <em>essentially</em> strings, I have tried using <code>str_sort(names(dataSet))</code>.  However, this returns the original column names as it <em>is</em> already sorted.  If I can get the column's name sorted, I know I can rearrange the columns in the tibble object.  I've worked with time objects before, but those are usually for formats like <em>mm/dd/yyyy</em>, but nothing in terms of semesters.  Any help will be greatly appreciated.  Thanks in advance!</p>