Restarting R-Ladies ATL

…and Learning About Rmarkdown and Quarto…

Event Date: March 7, 2024

Last updated: Mar 06, 2024



Melinda Higgins, PhD.
R-Ladies ATL Co-founder
Director Biostatistics and Data Core
Emory University - School of Nursing


R-Ladies Code of Conduct


R-Ladies is dedicated to providing a harassment-free experience for everyone. We do not tolerate harassment of participants in any form.

This code of conduct applies to all R-Ladies spaces, including meetups, Twitter, Slack, mailing lists, both online and offline. Anyone who violates this code of conduct may be sanctioned or expelled from these spaces at the discretion of the Global Leadership Team.1

R-Ladies Mission


R-Ladies is a worldwide organization whose mission is to promote gender diversity in the R community.

As a diversity initiative, the mission of R-Ladies is to achieve proportionate representation by encouraging, inspiring, and empowering people of genders currently underrepresented in the R community. R-Ladies’ primary focus, therefore, is on supporting minority gender R enthusiasts to achieve their programming potential, by building a collaborative global network of R leaders, mentors, learners, and developers to facilitate individual and collective progress worldwide.1

Agenda


Tonight’s Agenda

  • 6:30-7:00 Welcome and Introductions
  • 7:00-7:45 RMarkdown Overview and (brief) Introduction to Quarto
  • 7:45-8:00 Q&A and Open Discussion - Ideas for Next Meeting(s)

Quick Introductions


Introduce Yourselves!

  • Name
  • Level of experience with R
  • How Best Can R-Ladies Help You?

Let’s Get Started with Rmarkdown R-

Why Learn RMarkdown?


Learn R Markdown


https://rmarkdown.rstudio.com/

When “render” your document, R Markdown feeds the .Rmd file to knitr, which executes each code chunks and integrates the output into the document as a new markdown (.md) document that includes the code and its output.

The markdown file generated by knitr is then processed by pandoc (which is part of RStudio Desktop) which is responsible for creating the finished format.

Think of Pandoc as the “Swiss Army Knife” for converting documents between different formats https://pandoc.org/.

Create an Rmarkdown File


Start Rmarkdown File - Metadata


To get started, use the built-in template:

  • Type in a title
  • Type in your name as author
  • Choose an output document format
    • HTML is always a good place to start - only need a browser to read the output *.html file.
    • DOC usually works ok - but you need MS Word or Open Office installed on your computer.
    • PDF NOTE: You need a TEX compiler on your computer - Installing the tinytex https://yihui.org/tinytex/ R package will work.

Rmarkdown Sections


Example RMarkdown Template

Rmarkdown Sections


Example RMarkdown Template

At the top is YAML (yet another markup language).

Think of this as “metadata” for your document. Usually, at a minimum, the YAML will include the Title, Author and format of document to be rendered.

Rmarkdown Sections


Example RMarkdown Template

The Rmarkdown document combines both R code and “marked-up” text. Here are two R code chunks highlighted.

Everything inside ```{r} down to ``` is R code.

Rmarkdown Sections


Example RMarkdown Template

Everything else that is not YAML and is not a code chunk is simple text with “marked-up” syntax added to format the text as you would like.

Rmarkdown Sections


Example RMarkdown Template

When we click “Knit”, Rmarkdown uses the information in the YAML settings to render the document in the requested format by combining the final formatted text plus the output from the executed code into one final document.



NO MORE CUT AND PASTE!!





The final rendered document as an HTML document (as viewed in a Browser).

Live Demo of Rmarkdown and Quarto

Open Discussion Q&A


Happy Reporting!

Contact Information


Feel free to contact me with any feedback, concerns or suggestions:


Resources