Sorting decimal data does not work properly
<p>I have a data frame <code>Rating</code> with two columns <code>HospitalName</code>, <code>DeathRate_For_Hospital</code>. It looks like</p>

<pre><code>    HospitalName    DeathRate_For_Hospital
    MGM Hospital                       9.8                    
    HNK Hospital                      10.1
Hopkins Hospital                       8.3
    Arr Medicals                      10.0
           .                            .
           .                            .
</code></pre>

<p>All I need is to get the hospital name with least <code>DeathRate_For_Hospital</code>, so I order the <code>DeathRate_for_Hospital</code> like:</p>

<pre><code>Rating &lt;- Rating[order(round(as.numeric( Rating$ DeathRate_For_Hospital))),]
head(Rating,1)
</code></pre>

<p>Though I converted to ascending order, I don't know why it works. </p>

<p>This is working good if I have only numeric values. But if their are floating values sort is not working . </p>

<p>Thanks</p>