A thanksgiving dplyr Rubik’s cube puzzle for you

November 25, 2015
By

(This article was originally published at Simply Statistics, and syndicated at StatsBlogs.)

Nick Carchedi is back visiting from DataCamp and for fun we came up with a dplyr Rubik's cube puzzle. Here is how it works. To solve the puzzle you have to make a 4 x 3 data frame that spells Thanksgiving like this:

View the code on Gist.

To solve the puzzle you need to pipe this data frame in 

View the code on Gist.

and pipe out the Thanksgiving data frame using only the dplyr commands arrange, mutate, slice, filter and select. For advanced users you can try our slightly more complicated puzzle:

View the code on Gist.

See if you can do it this fast. Post your solutions in the comments and Happy Thanksgiving!



Please comment on the article here: Simply Statistics

Tags:


Subscribe

Email:

  Subscribe