R, Procrastination, Kittens, and Dune

I’m currently in that strange liminality of the dissertation stage of grad school, which means I spend a lot of hours in a little closet in the library cursing quietly. The work is going well—I have little basis to complain—but occasionally I hit some snag with a program I’m writing. For me these headaches seems to happen more frequently in R, leading to events like the following:

I do this frequently enough to have created a bash alias:

But I got to thinking yesterday that a more fruitful approach than advising a hiatus would be a temporary distraction. I decided to write an R function that would show a picture of a puppy and an inspirational quote. Sadly I could not find free APIs that served puppy pictures or inspirational quotes. I settled for cats and quotes from the Dune novels. Now if I feel frustrated, I can call plot.kitty() and get something like these:

You can see the function (which was written sloppily in the span of about 20 minutes) at this GitHub Gist.

Male Hamadryas Baboon GIFs

I’ve never been to Ethiopia, but my thesis nevertheless is a study of the two species of baboons that come together and hybridize there. I know the baboons only from their DNA, scientific articles, anecdotes, and nature documentaries. Using that last category, I made two GIFs showing the dual nature of Hamadryas baboons for a recent talk. Here’s a male grooming a female:

…and a male neck-biting a female that strayed too far out of his control:

Click on either to see the YouTube video source.