Skip to main content

Introduction to Data in R

Learn the language of data, study types, sampling strategies, and experimental design.

Start Course for Free
4 Hours15 Videos46 Exercises100,657 Learners3200 XP

Create Your Free Account



By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA. You confirm you are at least 16 years old (13 if you are an authorized Classrooms user).

Loved by learners at thousands of companies

Course Description

Scientists seek to answer questions using rigorous methods and careful observations. These observations—collected from the likes of field notes, surveys, and experiments—form the backbone of a statistical investigation and are called data. Statistics is the study of how best to collect, analyze, and draw conclusions from data. It is helpful to put statistics in the context of a general process of investigation: 1) identify a question or problem; 2) collect relevant data on the topic; 3) analyze the data; and 4) form a conclusion. In this course, you'll focus on the first two steps of the process.

  1. 1

    Language of data


    This chapter introduces terminology of datasets and data frames in R.

    Play Chapter Now
    Welcome to the course!
    50 xp
    Loading data into R
    100 xp
    Types of variables
    50 xp
    Identify variable types
    100 xp
    Categorical data in R: factors
    50 xp
    Filtering based on a factor
    100 xp
    Complete filtering based on a factor
    100 xp
    Discretize a variable
    50 xp
    Discretize a different variable
    100 xp
    Combining levels of a different factor
    100 xp
    Visualizing numerical data
    50 xp
    Visualizing numerical and categorical data
    100 xp
  2. 4

    Case study

    Apply terminology, principles, and R code learned in the first three chapters of this course to a case study looking at how the physical appearance of instructors impacts their students' course evaluations.

    Play Chapter Now


Course evaluationUC Berkeley admissionsUS state regions


n10iNick CarcheditommyjeeTom Jeon
Mine Cetinkaya-Rundel Headshot

Mine Cetinkaya-Rundel

Associate Professor at Duke University & Data Scientist and Professional Educator at RStudio

Mine is the Director of Undergraduate Studies and an Associate Professor of the Practice in the Department of Statistical Science at Duke University as well as a Professional Educator at RStudio. Her work focuses on innovation in statistics pedagogy, with an emphasis on computation, reproducible research, open-source education, and student-centered learning. She is the author of three open-source introductory statistics textbooks as part of the OpenIntro project and teaches the popular Statistics with R MOOC on Coursera.
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