What is rMarkdown?
R Markdown documents are fully reproducible. Use a productive notebook interface to weave together narrative text and code to produce elegantly formatted output. Use multiple languages including R, Python, and SQL. – rmarkdown official site
R Markdown supports dozens of static and dynamic output formats including HTML, PDF, MS Word, Beamer, HTML5 slides, Tufte-style handouts, books, dashboards, shiny applications, scientific articles, websites, and more. – rmarkdown official site
In Action – One source, many faces with high reproducibility.
to PDF and html files
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
--- title: "Embryo Cryopreservation Project" output: pdf_document: highlight: zenburn includes: in_header: header.tex pandoc_args: --number-sections toc: yes html_document: theme: united toc: yes --- ...code here |
to revealjs presentation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
--- title: "Embryo Cryopreservation Project" output: revealjs::revealjs_presentation: self_contained: false reveal_plugins: ["search", "zoom", "notes"] theme: default center: true incremental: true css: present_style.css pandoc_args: [ "--title-prefix", "Foo", "--id-prefix", "Bar" ] --- |
Emacs ESS mode with R markdown
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
;;markdown mode required (add-to-list 'load-path "/home/tan/config/emacs/extend/markdown-mode/") (require 'markdown-mode) ;;; Markdown mode (autoload 'markdown-mode "markdown-mode" "Major mode for editing Markdown files" t) (setq auto-mode-alist (cons '("\\.markdown" . markdown-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.md" . markdown-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.ronn?" . markdown-mode) auto-mode-alist)) ;;http://stackoverflow.com/questions/14231043/emacs-markdown-mode-error-on-preview-bin-bash-markdown-command-not-found (setq load-path (append (list "/home/tan/config/emacs/extend/polymode/" "/home/tan/config/emacs/extend/polymode/modes") load-path)) (require 'poly-R) (require 'poly-markdown) ;;; MARKDOWN (add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode)) (add-to-list 'auto-mode-alist '("\\.md" . poly-markdown+r-mode)) |
26
MAY
MAY
About the Author:
Beyond 8 hours - Computer, Sports, Family...