Guest User

Untitled

a guest
Jan 19th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. df[ order(row.names(df)),]
  2.  
  3. A B C D E
  4. 1 13 6 4 4 3
  5. 10 16 5 3 8 3
  6. 100 6 4 12 14 5
  7. 101 2 14 15 3 10
  8. 102 5 2 2 9 5
  9. 103 9 1 12 3 15
  10. 104 15 1 1 8 2
  11. 105 2 10 14 7 4
  12. 106 6 2 10 2 9
  13. 107 3 1 1 3 22
  14. 108 11 4 1 6 15
  15. 109 4 29 2 6 2
  16. 11 6 29 1 4 1
  17.  
  18. row.names(df) <- attr(df, "row.names")
  19. row.names(df) <- as.numeric(row.names(df))
  20.  
  21. [1] "character" "vector" "data.frameRowLabels" "SuperClassMethod"
Add Comment
Please, Sign In to add comment