### Welcome

This is the personal blog of Andrew MacDonald

## A tidy game of life

### Not truly a game, nor truly alive, nor very tidy

Ever since I moved to France for my postdoc in September 2016, I’ve tried to practice French whenever I can. One easy way to do that is by consuming YouTube channels in French – great things to put on the the background while I make food for my son, or feed my son, or clean up after feeding my son, etc. One of my favourite chaînes de Youtube is Science Etonnante, by David Louapre. [Read More]

## Population growth with functional programming

Today I want to tell you about an approach for functional programming in R – and then apply it to studying population growth! I have been studying some of the purrr functions lately. They are a useful family of functions for performing two common tasks in R: manipulating lists and altering the behaviour of functions. If you’d like a high-quality guide to this group of functions, set aside some time to work through Jenny Bryan’s excellent tutorial and Hadley Wickham’s chapter on Lists. [Read More]

## Twitter recommends stats books

### What are my brilliant friends reading?

Yesterday I asked my beloved Twitter nerds to recommend to me their favourite quantitative texts in Ecology: my postdoc super tells me I can BUY BOOKS! 💓📚📚💓 quick sweet friends, what are your fun statistical ecology book recommendations? — Andrew MacDonald (@polesasunder) December 2, 2016 As a way of saying “Thank you!” I thought that I would put all the books in a list for anyone who is curious. [Read More]

## Continuous fractions with Map and Reduce

Over the summer, some of us here at UBC started a reading group based around Hadley Wickham’s book, Advanced R Programming. The goal was to compare our answers to the exercises and our impressions of the content. We recently read my favourite chapter, Functionals, where readers are challenged to read about some algorithms in Structure and Interpretation of Computer Programs, and implement it in R. I wanted to share some functions I wrote to calculate these exotic things called k-term finite continued fractions, based on that challenge: [Read More]