reproducibility 2 r markdown
play

Reproducibility 2 R Markdown Workshop 4 2 Aim In this session - PowerPoint PPT Presentation

1 Reproducibility 2 R Markdown Workshop 4 2 Aim In this session learn how to create fully reproducible outputs in a variety of formats using R Markdown Objectives By following the slides and applying the techniques to examples the


  1. 1 Reproducibility 2 R Markdown Workshop 4

  2. 2 Aim In this session learn how to create fully reproducible outputs in a variety of formats using R Markdown Objectives By following the slides and applying the techniques to examples the successful student will be able to: - use r markdown to format a document - be able to select code chunk options to control whether code runs and appears, and output is displayed - use inline coding to display output with text elements - use formatting including tables, headers, lists, special characters - produce reproducible reports and evaluate their success in doing so

  3. 3 Reproducibility continuum Organise your files Increasing reproducibility Script everything Required here Organisation and Comments Code: formatting and style Code: ‘algorithmically’ / ‘algebraically’ Use RStudio, R Markdown, knitr Collaboration and Version control: Git and GitHub Public repositories of protocols, raw data, and source code

  4. 4 Reproducibility: Script everything R Markdown The ‘lab book’, the analysis and code, and the report all in one document. Can work on the analysis and the report simultaneously. Can determine what code runs, what output appears Can output in different formats

  5. 5 Reproducibility: Use RStudio, R Markdown, knitr knitr “ Elegant, flexible and fast dynamic report generation with R ” enables integration of R code into Markdown, LaTeX and HTML R Markdown “R Markdown documents are fully reproducible. Use a productive notebook interface to weave together narrative text and code to produce elegantly formatted output.”

  6. 6 R Markdown - under the hood markdown files: Have an .Rmd extension Contain plain text and R code chunks. knitr: executes all of the R code chunks and creates a new markdown (.md) document of the R code and it’s output Pandoc processes the .md file to html, PDF, MS Word document, etc etc

  7. 7 R Markdown Simpler than it seems: [Install rmarkdown] Open a new R markdown document Write document - simple formatting is very easy, fancy formatting is easy Knit the document demo

  8. 8 R Markdown R Markdown supports dozens of static and dynamic output formats including: HTML PDF MS Word Beamer HTML5 slides Tufte-style handouts Books (bookdown) Shiny applications scientific articles Websites, and more (blogdown)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend