Get access to all lessons in this course.
-
RMarkdown
- Why Use RMarkdown?
- RMarkdown Overview
- YAML
- Text
- Code Chunks
- Wrapping Up
-
Data Wrangling and Analysis
- Getting Started
- The Tidyverse
- select
- mutate
- filter
- summarize
- group_by
- count
- arrange
- Create a New Data Frame
- Crosstabs
- Wrapping Up
-
Data Visualization
- An Important Workflow Tip
- The Grammar of Graphics
- Scatterplots
- Histograms
- Bar Charts
- color and fill
- scales
- Text and Labels
- Plot Labels
- Themes
- Facets
- Save Plots
- Wrapping Up
-
Wrapping Up
- You Did It!
Fundamentals of R
RMarkdown Overview
This lesson is locked
This lesson is called RMarkdown Overview, part of the Fundamentals of R course. This lesson is called RMarkdown Overview, part of the Fundamentals of R course.
Transcript
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
Your Turn
Create a new project. Don't worry too much about what's it called, etc because we'll only use this for a bit to demonstrate how RMarkdown works.
Create a new RMarkdown file, setting the default output format as Word.
Save your RMarkdown file as report.Rmd.
Look through this RMarkdown file and make sure that you can identify the YAML, text sections, and code chunks.
Click the Knit button and open the file that gets produced (report.docx).
You need to be signed-in to comment on this post. Login.
Béatrice Leydier
March 25, 2021
I've noticed my document by default doesn't include a date and author - I can easily add in manually, but was wondering if it was a setting I should change in my Rstudio app?
Béatrice Leydier
March 25, 2021
Nevermind - figured out in the next lesson that the author was a case to fill when creating the document, and the date does appear automatically if the author is filled (seems like it is ommitted if the author is as well).
David Keyes
March 25, 2021
Glad you got it figured out!
David Keyes
September 18, 2021
Yup, you can definitely change it! I'll usually do HTML when I first start something because it's easiest. I'll then later change to a different format depending on what I need for my final deliverable.
Payal Mulchandani
September 20, 2021
Getting an error which says - Required package version could not be found: caTools 1.14 is not available. What do I need to update ?
David Keyes
September 21, 2021
Very odd. It looks like you need to update the caTools package. You can do that with this code:
install.packages("caTools")
Patricia Montano
January 10, 2022
This is very cool!! I'm looking forward to the next sections and already seeing how this could be time saver.
David Keyes
January 10, 2022
It's my favorite thing about R!
Tatiana Bustos
July 21, 2022
Had no idea R could do this with reports! VERY COOL
David Keyes
July 21, 2022
Yeah, and you can even make multiple reports at once using RMarkdown! See this article explaining the process and this example of multiple reports we made for a client.
Hatem Kotb
August 3, 2022
Amazing examples, thank you for sharing!
Jonathan Han
October 3, 2022
Hi David,
I was experimenting the formats that we could product upon knitting RMarkdown. However, I ran into some trouble while attempting to produce a PDF output.
The error message on the 'compile PDF' tab was — Unable to find specific LaTeX program 'pdfLaTeX' on system path.
Does this mean that I might have to additionally install other packages to enable this?
David Keyes
October 3, 2022
I think this means that RMarkdown is having trouble finding LaTeX, which it needs to compile your document into PDF. Can you please install
tinytex
using this code and then try again:Please let me know if that works!