1. Aprender
  2. /
  3. Cursos
  4. /
  5. Importing Data in R (Part 1)

Connected

Exercício

Import a local file

In this part of the chapter you'll learn how to import .xls files using the gdata package. Similar to the readxl package, you can import single Excel sheets from Excel sheets to start your analysis in R.

You'll be working with the urbanpop.xls dataset, the .xls version of the Excel file you've been working with before. It's available in your current working directory.

Instruções

100 XP
  • Load the gdata package with library(). gdata and Perl are already installed on DataCamp's Servers.
  • Import the second sheet, named "1967-1974", of "urbanpop.xls" with read.xls(). Store the resulting data frame as urban_pop.
  • Print the first 11 observations of urban_pop with head().