forked from christophergandrud/Rep-Res-Book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
73 lines (49 loc) · 2.65 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# [Reproducible Research with R and RStudio (Second Edition)](http://christophergandrud.GitHub.io/RepResR-RStudio/)
[<img src="http://4.bp.blogspot.com/-p0c-0swxJ_8/VV7sxxgQ4UI/AAAAAAAAHTQ/hji_MT68PZ4/s1600/2ndEd_rep_res.jpg" align="right" />](http://amzn.com/1498715370)
[Christopher Gandrud](http://christophergandrud.blogspot.com/p/biocontact.html)
[CRC Press/Chapman & Hall](http://www.tandf.net/books/details/9781498715379/)
The files in this repository comprise the source code for creating
**Reproducible Research with R and RStudio**.
### File Organization
The main files used to create the manuscript of the book are in the `Source`
folder. This folder contains the parent *knitr* `.Rnw` file in the
`Source/Parent/` directory. Child documents for the book chapters are in the
`Source/Children/` directory and child files for the book's front matter are in
the `Source/FrontMatter/` directory.
### Reproduce the Book
The book can be reproduced by using the R package *knitr*. To do this:
1. Make sure you have [R](http://www.r-project.org/),
[LaTeX](http://www.latex-project.org/ftp.html), and the *knitr* R package
installed on your computer. Also install Andre Simon's
[highlighter utility](http://www.andre-simon.de/zip/download.html).
2. Download this repository and point the directories in the *BookMake.R* make
file to where it is downloaded to.
3. Run the *BookMake.R* make file in R.
Note: To install the R packages used to compile the book open the
*Source/Children/FrontMatter/Packages.Rnw*. Find:
```
doInstall <- FALSE
```
in the code chunk labeled "FrontPackageCitations". Change the value `FALSE` to
`TRUE` and run the code chunk.
**Note:** the LaTeX file will compile with errors and warnings. These are
related to stylistic choices and should largely be ignored. But because of this
you will need to **compile the document a few times** to get the full text
with bibliography and index.
#### Reproducing the Book in Windows.
If you would like to reproduce the book and are using Windows you will need to
install [RTools](http://cran.r-project.org/bin/windows/Rtools/installer.html).
Please use the recommended installation to ensure that your system PATH is set
up correctly. Otherwise your computer will not know where the tools are.
#### Reproducing this Book in Linux
You will need to install the R packages RCurl and XML separately. See
[this post](https://GitHub.com/cboettig/treeBASE/issues/5) for more details.
### Session Info
The current version of the book manuscript was compiled with
[RStudio](http://www.rstudio.com/) (v. 0.99.560 developer build) with the
following R session:
```{r, echo=FALSE}
sessionInfo()
```
---
(c) Christopher Gandrud (2015)