-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.Rmd
57 lines (44 loc) · 1.99 KB
/
index.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
---
title: "36100 Data Science for Innovation materials"
author: "Simon Knight"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
output: bookdown::gitbook
documentclass: book
bibliography: [book.bib,packages.bib]
biblio-style: apalike
link-citations: true
nocite: |
@*
github-repo: sjgknight/dsi
description: "This is some of the materials we'll use in the class. These materials were published with the package bookdown::gitbook."
---
# Prerequisites
This is a _sample_ book written in **Markdown**. You can use anything that Pandoc's Markdown supports, e.g., a math equation $a^2 + b^2 = c^2$.
The **bookdown** package can be installed from CRAN or Github:
```{r eval=FALSE}
#install.packages("bookdown")
# or the development version
# devtools::install_github("rstudio/bookdown")
library(bookdown)
options(bookdown.render.file_scope = FALSE)
```
Remember each Rmd file contains one and only one chapter, and a chapter is defined by the first-level heading `#`.
To compile this example to PDF, you need XeLaTeX. You are recommended to install TinyTeX (which includes XeLaTeX): <https://yihui.name/tinytex/>.
## What's in here?
There are: Some vignettes (next), two sample AT2 templates, there is also a third but embedding it currently breaks things. And then references.
There are learnr packages I'll include at some point.
## To download and use the code...
And code for the book can be found <https://github.com/sjgknight/dsi>
```{r serve}
#If you've downloaded the code for the book, you can preview it by running the line below
#bookdown:::serve_book()
```
```{r include=FALSE}
#knitr::opts_chunk$set(cache = TRUE)
# automatically create a bib database for R packages
knitr::write_bib(c(
.packages(), 'bookdown', 'knitr', 'rmarkdown'
), 'packages.bib')
#This passes a list of all packages loaded in the current session to write_bib, which writes the citations to "packages.bib" Notice we've separated "book.bib" from "packages.bib", so this works for packages, and you can create your book.bib manually
```