Homework

Do the following exercise:

Open a new file in Tinn-R. and write the R code to do the following:

  1. Load the GDP and life expectancy databases, which we already loaded. Also add a database called, “Countries_Population.csv”, which is in the same path you used for the other two databases thata re online in my Github folder.

  2. Merge the three databases, by country and year.

  3. Remove all unnecessary columns (you only want country, year, GDP per capita, life expectancy and population).

  4. Calculate the total GDP of each nation (basically, multiple per capita GDP by the number of people).

  5. Calculate the average Total GDP of each country.

Save the necessary code in Tinn and have it ready for next class.