Hello in this lecture we're going to learn how to sort a date or frame and we will sort these days off.
Graeme D.M. I think you already know it by the variable income.
I knew they'd upgrade.
Gimel 2 will be created each time.
So let's store the data by income standing which is the default option.
We will use the brackets here.
So in that bracket we must put the order function.
And here in the parameter that we must put the variable the sorting variable income awfuller the order
function we must put a coma and then nothing that's important.
The way we tell the program that we want to retain all the variables of the or data frame Deeble.
So let's do that let's sort by income stand in control Antar and view the data frame as you noted here
at the top.
We have the lowest income.
And here at the bottom we have the highest level of income.
OK.
Now let's talk the same data frame by the same barabar income but disbanding the thing is all more the
same.
But before that the variable name income here in the order of Ponson we have to add a negative the way
the date frame will be thwarted disbanding.
That's right.
That control Antar and the view D-Mo. to now here at the top we have the highest level of income.
And here at the bottom we have the lowest level of income.
So the database is sorted by income distending.
Now let's sort by two variables income and age is very simple.
Now the function order will have two arguments.
The variable income and age.
Don't forget to put a comma after the function order and nothing after the Colma that Thuram that that
you deem more to so this time the.
The database story is sorted by income Sandeen and again by age spending you noted that these two subjects
have the same income nine and they are sorted a standing by age 60 and 70.
OK now let's sort of buy two variables again but this time we thought by income standing and by age
depending the center is the same but the time before the variable age we have to add a minus a negative
in order to sort despondingly that rant again and view the variable D.M. to now this the data frame
do more to story is sorted by income standing.
And by age disbanding you noted that there's two objects that have the same income nine and they're
sorted disbanding by age 70 years 60 years.
OK that's all for sorting the date frames.
Thank you.