It's quite common to need to sort a dataset in order to see which areas, people or organisations are doing worst or best.
- R-Bloggers have written a tutorial on Sorting a data frame by the contents of a column
- The process is explained more simply here
You can see an example of this in practice (and work on a real dataset) here
I've written a project here which shows how to grab election survey data in either Stata or SPSS formats and export as CSV.
FiveThirtyEight's story The Dollar-And-Cents Case Against Hollywood’s Exclusion of Women was written with the help of R. You can read the methodology behind the story here and on FiveThirtyEight's GitHub repo you will find a folder containing an R script and the data it uses.
Some of the repos for the BBC Data Unit also include R script in RMarkdown: for example look for the Rmd files in this repo for a story about art collections or this RMarkdown file explaining how to work with migration data in R