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

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…

Contents