### CL’s blog

An intermittent blog about R, programming and other things I find interesting and want to share.### Blogroll

- Active R questions on StackOverflow
- Flowing Data The visualization and statistics site of Nathan Yau.
- Getting Genetics Done Software, Tips, & Productivity Hacks For Getting Things Done In Genetics Research
- Information Is Beautiful Ideas, issues, knowledge, data – visualized!
- R-Bloggers R news and tutorials contributed by (190+) R bloggers
- Retraction Watch An interesting side of scientific publishing
- Statistical Modeling, Causal Inference, and Social Science (Mostly) Andrew Gelman’s blog
- The Endeavour John Cook’s blog
- The Statistics Forum provides everyone the opportunity to participate in discussions about probability and statistics and their role in important and interesting topics.

# Tag Archives: R

## The mysterious case of the misbehaving writeLines() (or: a cat saves the day)

Dear readers and R experts, I submit to you a mysterious R quirk which has been baffling me for the best part of a week. I found a work-around but I’d love it if someone could explain this strangest of … Continue reading

## Anarchy Golf! And that’s your Sunday gone.

I like to follow good practice when I program. I want my code to be readable, properly indented, modular and re-usable. And I want my variables to have descriptive names. There’s nothing that I hate moderately dislike more than arbitrary … Continue reading

## plyr, ggplot2 and triathlon results, part II

I ended my previous post by mentioning how one could imagine other ways of looking at the triathlon data with plyr and ggplot2. I couldn’t help but carry on playing with it so here are more stats and graphs from … Continue reading

## An exercise in plyr and ggplot2 using triathlon results

I ran my last triathlon for this year a couple of weeks ago, in the beautiful town of Stratford-upon-Avon. The results were online the day after so I decided to have a look at my fellow competitors’ times, which gave … Continue reading

## Two Castles Run 2011

I did the Two Castles Run today; it’s a 10km race between Warwick and Kenilworth castles. The organizers were very quick to put the results online and even went the extra mile of offering them as a CSV file. It … Continue reading

## An unsurprising year

I’ve received one those FW:…:FW emails yesterday with the following text: 2011 is an unusual year. Add the last two digits of your birth year to the age you will turn on your birthday this year and you’ll get 111! … Continue reading

## Graph Bisection in R

Recently I had to partition a set of SNPs into a training set and a test set. Making a random split would not do: both sets would likely contain very similar SNPs due to linkage disequilibrium (LD), making them non-independent. … Continue reading

Posted in Uncategorized
Tagged bisection, graph, LD, LinkageDisequilibrium, R
Comments Off on Graph Bisection in R

## Block diagonal matrices in R

As far as I can tell, R doesn’t have a function for building block diagonal matrices so as I needed one, I’ve coded it myself. It might save someone some time. Example: Let m1 and m2 two square matrices. Select … Continue reading