From the course: R for Data Science: Analysis and Visualization
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Importing data from a spreadsheet - R Tutorial
From the course: R for Data Science: Analysis and Visualization
Importing data from a spreadsheet
- [Instructor] Now, it's great to use R's built-in sample data to see how the program works and to play around with some options. But chances are, you're going to want to analyze your own data. And the easiest way to deal with that is to import it, either as a CSV or comma separated values files, like a generic one-page spreadsheet, or as an Excel XLS or XLSX file. I'm going to be showing you how to do both of these using a package that comes as part of the tidyverse readxl. Now let's start by loading the tidyverse and then we'll load readxl. Now, even though this is installed as part of the tidyverse, because it's not part of the base packages, it needs to be loaded separately or explicitly. So, I'm going to load that now. And then I'm going to come down and first load a CSV file. This is the most common way of sharing data. CSV files are single sheets of rows and columns, they tend to be very easy to be imported into any…
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
-
-
-
-
Installing R3m 30s
-
(Locked)
Environments for R2m 54s
-
(Locked)
Installing RStudio1m 9s
-
(Locked)
Navigating the RStudio environment8m 17s
-
(Locked)
Entering data7m 2s
-
(Locked)
Data types and structures10m 35s
-
(Locked)
Comments and headers5m 59s
-
(Locked)
Packages for R4m 18s
-
(Locked)
The tidyverse5m 38s
-
(Locked)
Piping commands with |4m 42s
-
(Locked)
Sample datasets4m 35s
-
(Locked)
Importing data from a spreadsheet5m 24s
-
-
-
-
-