Get access to all lessons in this course.
-
Advanced Data Wrangling and Analysis
- Overview
- Importing Data
- Tidy Data
- Reshaping Data
- Dealing with Missing Data
- Changing Variable Types
- Advanced Variable Creation
- Advanced Summarizing
- Binding Data Frames
- Functions
- Merging Data
- Renaming Variables
- Quick Interlude to Reorganize our Code
- Exporting Data
-
Advanced Data Visualization
- Data Visualization Best Practices
- Tidy Data
- Pipe Data Into ggplot
- Reorder Plots to Highlight Findings
- Line Charts
- Use Color to Highlight Findings
- Declutter
- Use the scales Package for Nicely Formatted Values
- Use Direct Labeling
- Use Axis Text Wisely
- Use Titles to Highlight Findings
- Use Color in Titles to Highlight Findings
- Use Annotations to Explain
- Tweak Spacing
- Customize Your Theme
- Customize Your Fonts
- Try New Plot Types
-
Advanced RMarkdown
- Advanced Markdown Text Formatting
- Tables
- Advanced YAML
- Inline R Code
- Making Your Reports Shine: Word Edition
- Making Your Reports Shine: HTML Edition
- Making Your Reports Shine: PDF Edition
- Presentations
- Dashboards
- Other Formats
-
Wrapping Up
- You Did It!
Going Deeper with R (v1)
Making Your Reports Shine: Word Edition
This lesson is locked
This lesson is called Making Your Reports Shine: Word Edition, part of the Going Deeper with R (v1) course. This lesson is called Making Your Reports Shine: Word Edition, part of the Going Deeper with R (v1) course.
If the video is not playing correctly, you can watch it in a new window
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
Use a reference document to change the look and feel of your report when knitted to Word
Learn More
Daniel Hadley talks about using reference documents to brand RMarkdown reports in this video from rstudio::conf 2018.
Richard Layton also has an article on reference documents on the RStudio website.
You need to be signed-in to comment on this post. Login.
Abby Isaacson
June 10, 2021
FYI, I got an error when trying the word default, saying: Error: Functions that produce HTML output found in document targeting docx output. Please change the output type of this document to HTML. Alternatively, you can allow HTML output in non-HTML formats by adding this option to the YAML front-matter of your rmarkdown file:
always_allow_html: true
Note however that the HTML output will not be visible in non-HTML formats.
So I had to add the recommended line before the output (after did not work): title: "Who's Getting Vaccinated for Measles in U.S. Schools?" author: "Abby Isaacson" date: "3/22/2021" always_allow_html: true output: word_document: default html_document: toc: TRUE number_sections: FALSE
This yielded the default Word doc, however my second question (which has been true for your paged report templates as well): The leaflet map I created in the last section has disappeared. When I knit to PDF, the map is still there just not interactive. With paged report or Word, it's just gone. Any tips?
JULIO VERA DE LEON
May 10, 2022
Hi! Is it possible to apply themes to a table and make it appear with that theme in Word?
Chris Matthis
May 26, 2022
I think the solution video and the main video are the same 53 second clip. Should the main one be different and introduce the template building? Thanks!
Sara Cifuentes
June 9, 2022
Hello, I have created a template document. However, when I knit it, I do not receive any error, and the word document maintains the default appearance without changes.
output: word_document: reference_docx: template.docx html_document: toc: TRUE toc_depth: 2 toc_float: TRUE
Andrew Paquin
May 30, 2023
Hi David, I ran into a bit of trouble. Parts of my chosen template document have come over to my report, but not all. I've described what I see in the video linked below. Any ideas? https://www.loom.com/share/017e9dbe8597432d92e7554f1f9207f4