课程: Data Wrangling in R

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Importing CSV files into 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…

内容