From the course: Data Wrangling in R
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Importing TSV files into R
From the course: Data Wrangling in R
Importing TSV files into R
- [Instructor] Let's now take a look at how to import a TSV file into your R environment. In R, the tidyverse includes a function called read_tsv() that allows you to import tab-separated value files. Just like with read_csv(), you can give read_tsv() 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 loading in the Medicare charge data file that I showed you in the last video. I begin by loading in the Tidyverse library, and let's try reading in the file. I'm going to call it Inpatient, and I'm going to load it using the read_tsv() function. And my file name here is similar to the last one: It's HTTP://594442.youcanlearnit.net/inpatient.tsv We'll load in that file and then we'll take a look at the results using the glimpse command. Now, I can see already that we have a few things that we need to correct here. Let's start with the variable names. They all have those spaces 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.
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)
-
-
-
-
-
-