From character to numeric pedigrees

Breakdancing in Ancud, Chiloé.

In quantitative genetic analyses we often use a pedigree to represent the relatedness between individuals, so this is accounted in the analyses, because the observations are not independent of each other. Often this pedigree contains alphanumeric labels, and most software can cope with that. Sometimes, though, we want to use numeric identities because we would… Continue reading From character to numeric pedigrees

Categorized as r, teaching

Reducing friction in R to avoid Excel

View of my desk in research mode, including friendly robot (Photo: Luis, click to enlarge).

When you have students working in a project there is always an element of quality control. Some times the results just make sense, while others we are suspicious about something going wrong. This means going back to check the whole analysis process: can we retrace all the steps in a calculation (going back to data… Continue reading Reducing friction in R to avoid Excel

Keeping track of research

If you search for data analysis workflows for research there are lots of blog posts on using R + databases + git, etc. While in some cases I may end up working with a combination like that, it's much more likely that reality is closer to a bunch of emailed Excel or CSV files. Some… Continue reading Keeping track of research

Categorized as r, research

Calculating parliament seats allocation and quotients

Gratuitous picture: tree on stilts (Photo: Luis, click to enlarge).

I was having a conversation about dropping the minimum threshold (currently 5% of the vote) for political parties to get representation in Parliament. The obvious question is how would seat allocation change, which of course involved a calculation. There is a calculator in the Electoral Commission website, but trying to understand how things work (and… Continue reading Calculating parliament seats allocation and quotients