Importing Data Into R

Learn how to parse data in any format. Whether it's flat files, statistics software, databases, or web data, you'll handle it all.
Start Course for Free
4 Hours11 Videos68 Exercises28,459 Learners
5850 XP

Create Your Free Account

GoogleLinkedInFacebook
or
By continuing you accept the Terms of Use and Privacy Policy. You also accept that you are aware that your data will be stored outside of the EU and that you are above the age of 16.

Loved by learners at thousands of companies


Course Description

Importing data into R to start your analyses: it should be the easiest step. Unfortunately, this is almost never the case. Data can come in all sorts of formats, ranging from flat files and statistical software files to databases and web data. Knowing which approach to use is key to getting started with the actual analysis. In this course, you will learn all the basics on how to load data into R so you can get up and running in no time!

  1. 1

    Importing data from flat files

    Lots of data comes in the form of flat files: simple tabular text files. Learn how to import all common formats of flat file data with base R functions and the dedicated readr and data.table packages.
    Play Chapter Now
  2. 2

    Importing data from Excel

    Excel is a very widely used data analysis tool. If you prefer to do your analyses in R, though, you'll need an understanding of importing CSV data into R. This chapter will explain you how to use readxl and gdata to do so. The XLConnect package that takes all of this one step further, will also be discussed.
    Play Chapter Now
  3. 3

    Importing data from other statistical software

    Next to R, there are also other commonly used statistical software packages: SAS, STATA and SPSS. Each of them has their own file format. Learn how to use the haven and foreign packages to get them into R with remarkable ease!
    Play Chapter Now
  4. 4

    Importing data from relational databases

    Many companies store their information in relational databases. The R community has also developed R packages to get data from these architectures. You'll learn how to connect to a database, how to retrieve data from it, and how to make things more efficient by performing a part of your computations on the database side.
    Play Chapter Now
  5. 5

    Importing data from the web

    More and more of the information that data scientists are using, resides on the web. Importing this data into R requires an understanding of protocols and typical data formats used on the web. In this chapter, you'll get a crash course in HTTP, learn to perform your own HTTP requests from inside R and get to know a popular web data format: JSON.
    Play Chapter Now
Collaborators
Emna ChahedFrauke Hein
Filip Schouwenaars Headshot

Filip Schouwenaars

Data Science Instructor at DataCamp
Filip is the passionate developer behind several of DataCamp's interactive courses, covering both R and Python. Under the motto 'Eat your own dog food', he has used the techniques DataCamp teaches its students to perform data analysis for DataCamp. Filip holds degrees in Electrical Engineering and Artificial Intelligence.
See More

What do other learners have to say?

I've used other sites—Coursera, Udacity, things like that—but DataCamp's been the one that I've stuck with.

Devon Edwards Joseph
Lloyds Banking Group

DataCamp is the top resource I recommend for learning data science.

Louis Maiden
Harvard Business School

DataCamp is by far my favorite website to learn from.

Ronald Bowers
Decision Science Analytics, USAA

Join over 7 million learners and start Importing Data Into R today!

Create Your Free Account

GoogleLinkedInFacebook
or
By continuing you accept the Terms of Use and Privacy Policy. You also accept that you are aware that your data will be stored outside of the EU and that you are above the age of 16.