Skip to main content

Introduction to Importing Data in R

4.4+
14 reviews
Beginner

In this course, you will learn to read CSV, XLS, and text files in R using tools like readxl and data.table.

Start Course for Free
3 Hours11 Videos42 Exercises175,954 Learners

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Loved by learners at thousands of companies


Course Description

Importing data into R should be the easiest step in your analysis. Unfortunately, that is almost never the case. Data can come in many formats, ranging from .csv and text files, to statistical software files, to databases and HTML data. Knowing which approach to use is key to getting started with the actual analysis. In this course, you’ll start by learning how to read .csv and text files in R. You will then cover the readr and data.table packages to easily and efficiently import flat file data. After that, you will learn how to read .xls files in R using readxl and gdata.
  1. 1

    Importing data from flat files with utils

    Free

    A lot of data comes in the form of flat files: simple tabular text files. Learn how to import the common formats of flat file data with base R functions.

    Play Chapter Now
    Introduction & read.csv
    50 xp
    read.csv
    100 xp
    stringsAsFactors
    100 xp
    Any changes?
    50 xp
    read.delim & read.table
    50 xp
    read.delim
    100 xp
    read.table
    100 xp
    Arguments
    100 xp
    Column classes
    100 xp
    Final Thoughts
    50 xp
  2. 2

    readr & data.table

    In addition to base R, there are dedicated packages to easily and efficiently import flat file data. We'll talk about two such packages: readr and data.table.

    Play Chapter Now
  3. 3

    Importing Excel data

    Excel is a widely used data analysis tool. If you prefer to do your analyses in R, though, you'll need an understanding of how to import .csv data into R. This chapter will show you how to use readxl and gdata to do so.

    Play Chapter Now
  4. 4

    Reproducible Excel work with XLConnect

    Beyond importing data from Excel, you can take things one step further with XLConnect. Learn all about it and bridge the gap between R and Excel.

    Play Chapter Now

In the following tracks

Data Scientist with RData Scientist Professional with RImporting & Cleaning Data with R

Prerequisites

Introduction to R
Filip Schouwenaars HeadshotFilip Schouwenaars

Data Science Instructor at DataCamp

Filip is the passionate developer behind several of DataCamp's most popular Python, SQL, and R courses. Currently, Filip leads the development of DataCamp Workspace, a collaborative data science notebook. Under the motto 'Eat your own dog food', he uses Workspace to understand how users learn on and interact with DataCamp. Filip holds degrees in Electrical Engineering and Artificial Intelligence.
See More

Don’t just take our word for it

*4.4
from 14 reviews
71%
14%
7%
0%
7%
Sort by
  • Elizabeth G.
    about 1 month

    Excellent instruction on importing data from flat files and from Excel. Many options described. From the introduction, I was expecting a lesson on importing data from SAS and STATA, too -?

  • Michal G.
    about 1 month

    clearly explained, good exercises

  • Kristen S.
    5 months

    Going back to the basics of importing was extremely helpful when working with different filetypes. I thought I knew everything but there's a lot more to learn!

  • Joaquim J.
    5 months

    It was sufficient to learn how to access data from R. I feel very confident!

  • Moriah P.
    5 months

    good overview of different libraries available for importing data into R

  • Loading ...

"Excellent instruction on importing data from flat files and from Excel. Many options described. From the introduction, I was expecting a lesson on importing data from SAS and STATA, too -?"

Elizabeth G.

"clearly explained, good exercises"

Michal G.

"Going back to the basics of importing was extremely helpful when working with different filetypes. I thought I knew everything but there's a lot more to learn!"

Kristen S.

Join over 11 million learners and start Introduction to Importing Data in R today!

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.