-
-
Save eugeneteo/5a86b7429a24a583d042 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## we need the libraries bookdown, knitr, inline, markdown, pryr | |
system("git clone https://github.com/hadley/adv-r.git") | |
setwd("adv-r") | |
library(knitr) | |
embed_png <- bookdown:::embed_png | |
rmds <- list.files(pattern = "^.*rmd$") | |
sapply(rmds, function(x) knit(x)) | |
cat("---\ntitle: Advanced R\nauthor: Hadley Wickham\nlanguage: en-US\n...\n", | |
file = "front_matter.txt") | |
## assuming we installed pandoc via cabal | |
pandoc <- "~/.cabal/bin/pandoc" | |
files <- c("front_matter.txt", | |
"Introduction.md", | |
"Data-structures.md", | |
"Subsetting.md", | |
"Vocabulary.md", | |
"Style.md", | |
"Functions.md", | |
"OO-essentials.md", | |
"Environments.md", | |
"Exceptions-Debugging.md", | |
"Functional-programming.md", | |
"Functions.md", | |
"Function-operators.md", | |
"Computing-on-the-language.md", | |
"Expressions.md", | |
"dsl.md", | |
"Performance.md", | |
"Profiling.md", | |
"memory.md", | |
"Rcpp.md", | |
"C-interface.md") | |
build_cmd <- paste(pandoc, "-S -o adv-r.epub", paste(files, collapse = " ")) | |
system(build_cmd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment