Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Reading from a file
Reading from an Excel file
Summary
13. Summary & Exercise 1

Instruction

This is all for this part. We've learned a lot!

  1. In the beginning, we've learned to read different files with the help of a few functions:
    • read.csv() – for reading CSV (comma-separated values) files.
    • read.delim() – for reading files with the delimiter of our choice.
    • read.table() – which is a baseline function for those previous ones – we've learned to use it with parameters such as: header, stringsAsFactors, and sep.
  2. We've learned about Excel files. Using the readxl package, we used the:
    • read_excel() function to read a first sheet of the Excel file.
    • excel_sheets() function to get the names of the Excel's sheets.
    • read_excel() function with the sheet parameter which obtains the name of the sheet we want to use.

Before we move on to the next part of the course, let's review everything we covered in this one!

Exercise

Read market capitalization data from the data/markets.txt file into memory. The data is separated by slashes ("/"), column headers are provided. Assign the results to the markets variable.