I have had a bit of a break and caught up with some of the older blog posts I did not find time for earlier in 2017.
This one caught my eye: http://varianceexplained.org/r/start-blog/ especially the line ‘When you’ve given the same advice 3 times, write a blog post’. So I thought I’d write a blog post about a bit of R code advice. (Disclaimer: This wasn’t originally my work, but I used this advice more than 3 times, so am sharing here. This is a function I got from my colleague Phil TnT).
In some cases I get data in a table that simplifies the presentation by only labelling one row in a set of rows like this:
To use this like tidy data we need to fill these intervening cells.