RMarkdown is an excellent format to create documents which combine code outputs with text—a programming paradigm called Literate Programming first introduced by Donald Knuth. Although RMarkdown documents are mostly used by the R community, preferably within the RStudio IDE, the format is not restricted to the R language. Also other language engines like Python, SQL or Julia can be used with RMarkdown. The current knitr package version 1.33 lists even 44 available engines:
names(knitr::knit_engines$get())
[1] "awk" "bash" "coffee" "gawk" "groovy" [6] "haskell" "lein" "mysql" "node" "octave" [11] "perl" "psql" "Rscript" "ruby" "sas" [16] "scala" "sed" "sh" "stata" "zsh" [21] "asis" "asy" "block" "block2" "bslib" [26] "c" "cat" "cc" "comment" "css" [31] "dot" "embed" "fortran" "fortran95" "go" [36] "highlight" "js" "julia" "python" "R" [41] "Rcpp" "sass" "scss" "sql" "stan" [46] "targets" "tikz" "verbatim"
Thanks to the pandoc document converter RMarkdown also supports many different output formats which can be set with the output
parameter in the YAML header, including:
-
HTML: Static HTML files
output: html_document
-
PDF: PDF Documents generated through Latex,
output: pdf_document
-
Word: Microsoft Word documents,
output: word_document
-
Presentations: Presentation formats like MS Powerpoint
output: powerpoint_presentation
-
Dashboards: flexdashboard
output: flexdashboard::flex_dashboard
QBits Workspace facilitates the authoring of RMarkdown documents directly within the browser thanks to instant previews in the Viewer pane. The instant preview functionality leads to faster development of RMarkdown documents. See below a short presentation of how RMarkdown authoring works:
Create New RMarkdown Document
In the Workspaces Section section of your Dashboard you can create a New Workspace, enter its name and select the RMarkdown template:
Create HTML Document
Set output: html_document
in the YAML header of the document and hit the Render button:
Create PDF Document
Set output: pdf_document
and Render:
Create Word Document
Set output: word_document
and Render:
Create Powerpoint Presentation
Set output: powerpoint_presentation
and Render:
RMarkdown Example Powerpoint document
Give it a try by either creating a new workspace from scratch or by copying one of the existing QBit Workspace examples.
Happy reporting, feedback welcome! ✌️