Adding code chunks to your file
When creating your own reports, one of the first things you'll want to do is add some code! In the video, we discussed how you can add your own code by adding code chunks. Previously, we looked at the investment_annual_summary
dataset we'll be using throughout the course. In this exercise, let's take a look at the annual summary dataset as well as the other dataset we'll be using, investment_services_projects
.
Este exercício faz parte do curso
Reporting with R Markdown
Instruções do exercício
- Add a new code chunk to the Markdown file, starting at line
14
. - Within the code chunk, type the names of the
investment_annual_summary
andinvestment_services_projects
datasets to print them in the report.
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
{"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"}