Yihui Xie @ New York R Users Group
09/10/2013
Big thanks to Prof Xizhi Wu (School of Statistics, Renmin University of China), the first person who introduced R to Renmin Univ in 2001



library(knitr)
knit('your-document.Rmd') # compiles document
purl('your-document.Rmd') # extracts code
#' today I built a model
fit = lm(dist ~ speed, data = cars)
#' and I got the slope `r coef(fit)[2]`
#+ dist-speed, fig.width=5, fig.height=4
plot(cars)
abline(fit)
data, R, man, tests, demo, src, vignettesVignetteBuilder: knitr in DESCRIPTION\VignetteEngine{knitr::knitr} in vignettes# see list of vignettes
help(package = 'knitr', help_type='html')
# Docco Classic Style
knitr::pandoc()engineawk bash coffee gawk haskell perl python
Rscript ruby sas sed sh zsh highlight
Rcpp tikz dot c asy cat
x = 'hello, world'
print(x.split(', '))
['hello', 'world']