We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Firefox.

Create and Preview RMarkdown Documents with QBit Workspace

Jun 23, 2021

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:

 [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] "highlight" "Rcpp"      "tikz"      "dot"       "c"        
[26] "cc"        "fortran"   "fortran95" "asy"       "cat"      
[31] "asis"      "stan"      "block"     "block2"    "js"       
[36] "css"       "sql"       "go"        "python"    "julia"    
[41] "sass"      "scss"      "R"         "bslib"    

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! ✌️

Become a Data Science PRO

  • Access to all courses

    Including 15+ in-depth data science lessons

  • Real-world use cases

    Jump start your own projects with ease

  • Personal premium support

    Get help directly from our course writers

A great course set-up to get a first insight into the workings of R and to wet your appetite for more – the possibilities seem endless. A very enjoyable experience, thank you!

Liza Glesener, SICONA