From the course: Data Wrangling in R
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Importing CSV files into R
From the course: Data Wrangling in R
Importing CSV files into R
- [Instructor] Data scientists often need to import CSV files from the web or their local systems into R. In R, the Tidyverse includes a function called read_csv that allows you to import CSV files. You can just give this function a file name and run it, and R will do its best to read in your file. So let's give that a try by reading in the Chicago restaurant inspection file that I showed you in the last video. As a quick reminder, here's what that file looks like. It contains the results of over 140,000 restaurant inspections with each line representing a single inspection. Let's try loading that into R. I'm going to begin a new R script by loading the Tidyverse. And each time I type a line, I'm going to use the run button to execute that line. And now I'm going to try reading in the file. I'd like to store it in a tibble called inspections, and I'm going to populate that tibble with the read_csv function and then…
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.
Contents
-
-
-
-
-
(Locked)
What are CSV files?2m 53s
-
(Locked)
Importing CSV files into R6m 39s
-
(Locked)
What are TSV files?1m 29s
-
(Locked)
Importing TSV files into R6m 3s
-
(Locked)
Importing delimited files into R3m 33s
-
(Locked)
Importing fixed-width files into R3m 38s
-
(Locked)
Importing Excel files into R5m 44s
-
(Locked)
Reading data from databases and the web2m 20s
-
(Locked)
-
-
-
-
-
-