Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x <- data.frame("SN" = 1:7, "Age" = c(21,15,22,33,21,15,25), "Name" = c("John","Dora","Paul","Alex","Bud","Chad","Anton"))
- x[order(x[, 'Age']),]
- SN Age Name
- 2 2 15 Dora
- 6 6 15 Chad
- 1 1 21 John
- 5 5 21 Bud
- 3 3 22 Paul
- 7 7 25 Anton
- 4 4 33 Alex
- SN Age Name
- 6 6 15 Chad
- 2 2 15 Dora
- 5 5 21 Bud
- 1 1 21 John
- 3 3 22 Paul
- 7 7 25 Anton
- 4 4 33 Alex
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement