Question: The data file called countries . csv in the DataForLabs folder contains information about all the countries on Earth. Each row is a country, and

The data file called countries.csv in the DataForLabs folder contains information about all the countries on Earth. Each row is a country, and each column contains a variable.
Use read.csv() to read the data from this file into a data frame called countries.
Use summary() to get a quick description of this data set. What are the first three variables?
Using the output of summary(), how many countries are from Africa in this data set?
What kinds of variables (i.e., categorical or numerical) are continents, cell_phone_subscriptions_per_100_people_2012, total_population_in_thousands_2015 and fines_for_tobacco_advertising_2014?(Dont go by their variable names look at the data in the summary results to decide.)
Add a new column to your countries data frame that has the difference in ecological footprint between 2012 and 2000. What is the mean of this difference? (Note: this variable will have missing data, which means that some of the countries do not have data in this file for one or the other of the years of ecological footprint. By default, R doesnt calculate a mean unless all the data are present. To tell R to ignore the missing data, add an option to the mean() command that says na.rm=TRUE. Well learn more about this later.)
4. Using the countries data again, create a new data frame called AfricaData, that only includes data for countries in Africa. What is the sum of the total_population_in_thousands_2015 for this new data fram

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!