Plotting simplexes using R

In evolutionary game theory and related fields, one often needs to visualize the dynamics of three-dimensional systems, e.g. competition between three strategies x1, x2 and x3 for which x1 + x2 + x3 = 1. This is most conveniently done on a 2-simplex (ternary plot, de Finetti diagram), and the following code snippet defines a minimal way of visualizing data on a 2-simplex using R base graphics. The function takes a minimum of four arguments: x and y are vectors holding the x1 and x2 values (it is not necessary to input the remaining, third value, as x3 = 1 - x1 - x2); label is a vector of length 3 giving labels for the vertices of the simplex. More

Evolutionary game theory

Some thoughts on evolutionary game theory and its applicability in diachronic linguistics, originally prepared for Postgridiots in 2014. Access here as a PDF. More

Fixing LaTeX math commas

If you use different fonts for text and math in your LaTeX documents (not generally recommended, but necessary if your favourite font does not come with mathematics support), you may have found yourself annoyed by having two differently shaped commas, one in text mode and the other in math mode. Here’s a demonstration with Times as the text font and Computer Modern as the math font: The vertices $(1,0,0)$, $(0,1,0)$, and $(0,0,1)$\dots A simple way of fixing this is to force math mode to use the text font comma. More