From the course: R Programming in Data Science: High Variety Data
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Read individual cells from Excel
From the course: R Programming in Data Science: High Variety Data
Read individual cells from Excel
- [Instructor] Sometimes you're just going to need to read one individual cell from an Excel spreadsheet and to do that you can use readxl, which is another R package. Here's how to do it. First of all, be sure to set your working directory to chapter zero one of the exercise files and then create a spreadsheet file vector containing a pathname to simple spreadsheet dot xlxs. Let's take a quick look at that spreadsheet to find out what we're going to import. Here, a simple spreadsheet. And if we look at cell B24, we'll see that it contains the value 250, and that's the number we want to bring in. So let's go back to R. The first thing you'll want to do is install the readxl package if you haven't done so already and then use the library command to make sure that it's available to you. To read that single cell is fairly easy. We're going to read the value into one cell. That can be any vector name. And I'm going to use the read underbar Excel and it's important to get the underbar and…
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
-
-
-
Excel packages compared3m 29s
-
Read a workbook from Excel2m 53s
-
(Locked)
Write a workbook to Excel2m 16s
-
(Locked)
Read ranges from Excel3m 10s
-
(Locked)
Write ranges to Excel4m 52s
-
(Locked)
Read rows and columns from Excel2m 57s
-
(Locked)
Write rows and columns to Excel5m 12s
-
(Locked)
Read individual cells from Excel2m 55s
-
(Locked)
Write individual cells to Excel3m 50s
-
-
-
-
-