20.16 Exercises

  • In an Excel file, create the following dataset and save it as survey.xlsx. Alternatively, you can download it as an Excel file from here

  • Then, read it into R, with survey_id as a character variable and n_pets as a numerical variable. Hint: You will need to convert “none” to 0.

  • In another Excel file, create the following dataset and save it as roster.xlsx. Alternatively, you can download it as an Excel file from here.

Then, read it into R. The resulting data frame should be called roster and should look like the following.