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

Read individual cells from Excel

From the course: R Programming in Data Science: High Variety Data

Start my 1-month free trial

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…

Contents