How to sort the column in ascending order in R
<p>I want to make my column(date) in an ascending order.</p>

<p>I tried below but it didnt worked.</p>

<pre><code>data3 &lt;- data2[order(data2$date_1,decreasing = FALSE)]
</code></pre>

<p>It gave me this error:--</p>

<blockquote>
  <p>Error in [.data.frame(data2, order(data2$date_1, decreasing = FALSE)) : 
    undefined columns selected</p>
</blockquote>

<p>my data is </p>

<pre><code>Sr. date_1 No_of_births  
1   1   40255  
2   10  41874  
3   11  38940  
4   12  40320  
5   2   36428  
6   3   39940  
7   4   37641  
8   5   39288  
9   6   38789  
10  7   42148  
11  8   42980  
12  9   42112  
</code></pre>

<p>The output i want is as below with other columns also.
(((just showing date column)))</p>

<pre><code>Date

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12
</code></pre>