Functions I've written as answers to R questions on Stack Overflow