Exercise

Adding a table

Previously, you printed the datasets used in your report to your report so that the audience was able to look through the data themselves. Now, you'll create a table of the investment_region_summary to display this information more clearly to your audience. The investment_region_summary provides the total of all investments for each region from the 2012 to 2018 fiscal years.

Instructions

100 XP
  • Load the knitr package in the data code chunk, after the ggplot2 package on line 15.
  • Create a table of the investment_region_summary data in the tables code chunk that starts on line 44, with column names Region and Dollars in Millions and center alignment for both columns.
  • Add the following caption to the table: "Table 1.1 The total investment summary for each region for the 2012 to 2018 fiscal years."