opts_knit$set(base.dir='./', fig.path='', out.format='md')
opts_chunk$set(prompt=TRUE, comment='', results='markup')
# See yihui.name/knitr/options for more Knitr options.
##### Put other setup R code here

Installation

The gitbook R package is currently avaiable on Github. The devtools r citep(bib['devtools']) package provides a function to install R packages directly from github.

devtools::install_github('jbryer/Rgitbook')
require(Rgitbook)

The Gitbook.io framework is built using Node.js. Installers are available for most major platforms and can be downloaded from the Node.js website at http://nodejs.org/download/.

Once Node.js is installed the installGitbook function will attempt to download and install the Gitbook.io framework.

installGitbook()

We can verify that Gitbook is installed using the checkForGitbook function.

checkForGitbook()

If Gitbook Installation Fails

It is possible that the installation of Gitbook will not work since it requires root/administrator access. The installGitbook function will print an error message to help you install outside of R. On Mac and Linux systems, the following Unix command will install Gitbook:

sudo npm install gitbook -g

If you wish to build PDF versions of your book, install the PDF format using the following command:

sudo npm install gitbook-pdf -g


jbryer/Rgitbook documentation built on May 18, 2019, 7:01 p.m.