R code that I use for teaching and illustration of population genetic concepts.