I have the following data.frame
:
Linha Data Total Med.2 DP.2 Med.3 DP.3 Med.4 DP.4
1 2009 1.4749 NA NA NA NA NA NA
2 2010 2.9945 2.2347 1.0746 NA NA NA NA
3 2011 2.9945 2.9945 0.0000 2.4880 0.8774 NA NA
4 2012 3.0000 2.9973 0.0039 2.9963 0.0032 2.6160 0.7607
5 2013 2.9973 2.9986 0.0019 2.9973 0.0027 2.9966 0.0026
6 2014 2.9973 2.9973 0.0000 2.9982 0.0016 2.9973 0.0022
I need to reorder the data.frame
lines according to the Med.2
column information. How can I perform this procedure using R ?
I tried to use the functions
order
of the base package andarrange
of the packagedplyr
, but in both I got a wrong result.