Bookdown

An R package for creating an ebook. It can produce a book for the web, PDF, epub, etc. It can weave code through RMarkdown, knitr etc.

bookdown: Authoring Books and Technical Documents with R Markdown is an ebook (written by the author of the package) about using bookdown.