CommencerCommencer gratuitement

Adding sections to your report

Previously, you added the names of the datasets you'll be using to build your report to the Markdown file that will be used to create the report. Now, you'll add some headers and text to the document to provide some additional detail about the datasets to the audience who will read the report.

Cet exercice fait partie du cours

Reporting with R Markdown

Afficher le cours

Instructions

  • Add a header called Datasets to line 14 of the report, using two hashes.
  • Add headers to lines 16 and 23 of the report to specify each of the dataset names, Investment Annual Summary and Investment Services Projects, using three hashes.
  • Add the dataset names to the sentences in lines 18 and 25 of the report and format them as inline code.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

{"investment_report.Rmd":"---\ntitle: \"Investment Report\"\noutput: html_document\n---\n\n```{r data, include = FALSE}\nlibrary(readr)\n\ninvestment_annual_summary <- read_csv(\"https://assets.datacamp.com/production/repositories/5756/datasets/d0251f26117bbcf0ea96ac276555b9003f4f7372/investment_annual_summary.csv\")\ninvestment_services_projects <- read_csv(\"https://assets.datacamp.com/production/repositories/5756/datasets/78b002735b6f620df7f2767e63b76aaca317bf8d/investment_services_projects.csv\")\n```\n\n\n\n\n\n\nThe ___ dataset provides a summary of the dollars in millions provided to each region for each fiscal year, from 2012 to 2018.\n```{r}\ninvestment_annual_summary\n```\n\n\n\nThe ___ dataset provides information about each investment project from the 2012 to 2018 fiscal years. Information listed includes the project name, company name, sector, project status, and investment amounts.\n```{r}\ninvestment_services_projects \n```\n\n\n"}
Modifier et exécuter le code