DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Sorting Simple List In R
Onliners below create and then sort it in a ascending and descending fashion.
> l <- c(179, 201, 206, 217, 222, 234, 267, 10)//create simple list// >l[order(l)] //sort ascending// > l[rev(order(l))] //sort descending.//