R by example. It is one chapter of the book.