Skip to content

Instantly share code, notes, and snippets.

@stedy
Last active November 26, 2015 04:11
Show Gist options
  • Select an option

  • Save stedy/248808bf3cd7941a7273 to your computer and use it in GitHub Desktop.

Select an option

Save stedy/248808bf3cd7941a7273 to your computer and use it in GitHub Desktop.
#solution to question posed here: http://simplystatistics.org/2015/11/25/a-thanksgiving-dplyr-rubiks-cube-puzzle-for-you
library(dplyr)
df <- read.table("https://gist.githubusercontent.com/jtleek/aae1218a8f4d1220e07d/raw/26fb7b5e485f7b9d66406179079a9d6f9418d544/puzzle_nov25_2015.delim",
header=T) %>%
mutate(rank=c(1,3,2,4)) %>%
arrange(rank) %>%
select(col1, col3, col2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment