The R Companion for Introduction to Data Mining is now a downloadable book
The R examples used in my course CS 5/7331 Data Mining are now compiled into a downloadable PDF book (DOI 10.6084/m9.figshare.26750404) and an interactive online book.
The companion book is the official R Code for the popular textbook Introduction to Data Mining by Tan et al.