LoslegenKostenlos loslegen

Formatting the date

Now that your report includes some more high-level detail, you'd like to include the date using a different format. Be sure to refer to the tables of date formatting options from the video below.

Date formatting option tables.png

Diese Übung ist Teil des Kurses

Reporting with R Markdown

Kurs anzeigen

Anleitung zur Übung

  • Modify the date in the YAML header using the Sys.time() function so that the date displays as the decimal day, the full name of the month, and the four digit year, for example: 08 April 2020.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

{"investment_report.Rmd":"---\ntitle: \"Investment Report\"\nauthor: \"Add your name\"\ndate: \"`r format(___, '___')`\"\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## Datasets \n\n### Investment Annual Summary\n\nThe `investment_annual_summary` 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### Investment Services Projects\n\nThe `investment_services_projects` 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"}
Code bearbeiten und ausführen