Reporting with R Markdown
Learn to build R Markdown reports that combine dplyr analysis, ggplot2 plots and text, then reuse them with parameters and style them with CSS.
R Markdown keeps analysis code, written commentary and document settings together in one file, which is then knit into a finished report. You work with World Bank IFC investment and project data, summarize it with dplyr, chart it with ggplot2, and then shape the output with chunk options, a table of contents, parameters that produce new reports without manual edits, and a stylesheet for fonts and colors.
What You Will Achieve
- Set up an R Markdown file that combines code, formatted text and a YAML header, then knit it into a report
- Write report text that pulls in results computed by your dplyr code, next to ggplot2 charts
- Decide which code, results, warnings and messages readers see in the finished report
- Produce new versions of a report by changing its parameters, and apply your brand’s fonts and colors with CSS
Program Overview
Markdown File Basics: Code, Text, and the YAML Header
Builds a first file from its three parts and shows how to format text, add sections, links and images, and edit the header and date.
- Code chunks and text formatting
- Sections, links, and images
- Editing the YAML header and date format
Analyzing and Visualizing the IFC Data
Uses dplyr to filter the project data by country and year, then adds ggplot2 plots and controls how they display in the knit report.
- Filtering with dplyr and referencing results in the text
- Plots of the Investment Annual Summary and project data
- Global and local chunk options for plots
- Figure captions
Organizing and Customizing the Report
Covers lists, tables and chunk options that show or hide code and output, followed by a table of contents, parameters and a CSS file for styling.
- Bulleted and numbered lists and tables
- The include and echo options, and excluding warnings and messages
- Table of contents options and numbered sections
- Single and multiple parameters, and CSS styling of the title, author and date
Certificate Awarded (Paid)
Job Outlook
These skills serve analysts and researchers who work in R and hand their results to colleagues as readable documents, including reports that are rebuilt for each new country, year or dataset.
Good for: Analysts working in R who want their analysis, charts and commentary in one document they can rerun and restyle without editing it by hand.
Keep in mind: Every chapter works on knit reports built with the IFC data; Shiny apps come up only as a possible output format, not as something you build.
Bottom line: Carrying one dataset through the whole course makes the parameter and CSS lessons concrete, because you rebuild and restyle a report you assembled yourself.
Frequently Asked Questions
Which data do the report exercises use?
The exercises use World Bank datasets from the International Finance Corporation, including its Investment Annual Summary data and project records. You filter these by country and year with dplyr and plot them with ggplot2.
What can parameters do in an R Markdown report?
The final chapter adds one parameter, and then several, to a report. You use them to generate new reports with different values, so an existing report does not have to be edited by hand to produce a new one.
How does the course handle warnings and messages in the output?
One chapter covers warnings, messages and errors in knit reports. It shows how to exclude messages and warnings, and how the include and echo options decide whether code and its results appear in the final document.
How is the look of a report customized?
You reference a CSS file in the YAML header to apply your own fonts and colors. The lessons then style the header, the table of contents, and the title, author and date lines.
User Reviews
Write your review
You must be logged in to post a review.
Reviews can only be posted by registered learners. Log in or create a free account, then you will return here to post.


There are no reviews yet.