Code from the book, "The Art of R Programming"