FES 720 Introduction to R

LAB: Importing Data

This is the lab associated with the lecture and lesson on Importing Data in R.

Please upload your final completed lab on the Assignments page in Canvas, as per the instructions below.

You are welcome and expected to ask for help from the instructors if you get stuck: Please also come to the R Bootcamp on Friday—there is coffee and snacks!

Note: You are required to upload your cleaned dataset as a .txt or .csv file as part of this lab


Download the BirdFlu.xls file here.

The file BirdFlu.xls contains the annual number of confirmed cases of human Avian Influenza A/ (H5N1) for several countries reported to the World Health Organization (WHO). The data were taken from the WHO website (www.who.int/en/) and reproduced for educational purposes.

Prepare the data to be read into R as a .txt or .csv file (upload this file on the lab page on Canvas).

Write R code to address the following:

  1. Import these data into R.

  2. Use the names() and str() functions in R to view the data.

  3. What is the total number of bird flu cases in 2003 and in 2005?

  4. Which country has had the most cases?

  5. Which country has had the least bird flu deaths?

  6. What is the total number of bird flu cases per country?

  7. What is the total number of cases per year?


How to write up your answers

Please check the help page for a reminder, if you need to.


Updated: 2017-10-25