Problem:
Sorting Data in a Data Frame in R
Solution:
To sort a Data Frame in R, we need to use the order( ) function.
For Example:
We can use the built-in data Frame mtcars for this. By default, the sorting is in Ascending order. To sort the Data Frame in Descending order, we need to add a minus sign before the sorting column.
Read Further:
Accessing Data Frame Elements in R
Import a CSV Data Set as a Data Frame using R Syntax
Happy Coding!
0
Unknown
I appreciate your work on Data Science. It's such a wonderful read on Data Science course. Keep sharing stuffs like this. I am also educating people on similar Data Science training so if you are interested to know more you can watch this Data Science tutorial:-https://www.youtube.com/watch?v=gXb9ZKwx29U&t=237s
Unknown
Well done! It is so well written and interactive. Keep writing such brilliant piece of work. Glad i came across this post. Last night even i saw similar wonderful R Programming tutorial on youtube so you can check that too for more detailed knowledge on R Programming.https://www.youtube.com/watch?v=rgFVq_Q6VF0