Creating a report with a parameter

Reportistica con R Markdown

Amy Peterson

Head of Core Curriculum at DataCamp

Parameters

  • Create reports for different countries
  • Add inputs to the YAML header
Reportistica con R Markdown

Adding a parameter

YAML header with country parameter and Indonesia

Reportistica con R Markdown

Reviewing the code

Reviewing code chunk and object names for specific country references

Reportistica con R Markdown

Reviewing the code

Replacing specific country references in code chunk and object names

Reportistica con R Markdown

Reviewing the code

Reviewing code for country references

Reportistica con R Markdown

Reviewing the code

Replacing specific countries in the code with the country parameter

Reportistica con R Markdown

Reviewing the code

Reviewing ggplot2 code for specific country names in labels

Reportistica con R Markdown

Reviewing the code

Removing country references in ggplot2 code

Reportistica con R Markdown

Reviewing the text

 

Reviewing text for specific country references

Reportistica con R Markdown

Reviewing the text

 

Replacing specific country references in text with the country parameter

Reportistica con R Markdown

Reviewing the YAML header

YAML header with parameter

YAML header with parameter in title

Reportistica con R Markdown

Knitting the report

Markdown file for Turkey

Knit file for Turkey

Reportistica con R Markdown

Knitting a new report

Markdown file for Philippines

Knit file for Philippines

Reportistica con R Markdown

Let's practice!

Reportistica con R Markdown

Preparing Video For Download...