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.
Deze oefening maakt deel uit van de cursus
Reporting with R Markdown
Oefeninstructies
- Add a new code chunk to the Markdown file, starting at line
14. - Within the code chunk, type the names of the
investment_annual_summaryandinvestment_services_projectsdatasets to print them in the report.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
{"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"}