From the course: Data Visualization in R with ggplot2
Unlock this course with a free trial
Join today to access over 24,300 courses taught by industry experts.
Loading datasets with read_csv
From the course: Data Visualization in R with ggplot2
Loading datasets with read_csv
- [Instructor] When you're working with data in R, all of that data is stored in memory. However, we usually need to store our data on disc in files or in databases. Therefore, before we can visualize data, we need to load it into memory in R. The Tidyverse contains many different functions to read data into R from a variety of different formats. I cover these extensively in the course Data Wrangling in R and encourage you to take that course if you'd like to learn more about importing and manipulating data. For our purposes in this course, we'll just use one function read_csv. That function loads data from files containing comma separated values. The read_csv function reads each line into one row of a tibble. The dataset that we'll use contains information about colleges and universities in the United States. It's stored in a file called college.csv, and I've placed it on a web server where you can access it directly from your R code. We're going to use two different R packages in…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.