書名: Hands-On Exploratory Data Analysis with R作者名: Radhika Datar Harish Garg本章字?jǐn)?shù): 167字更新時間: 2021-06-24 14:10:41
Reading in Excel data with the readxl R package
The readxl R package makes it very easy and straightforward to read data from Excel files into R:

We start by loading the module into R:
library(readxl)
Reading Excel data with readxl is simple; we just need to call the read_excel function and pass in the file path, as follows:
read_excel("data.xls")
readxl supports both the old XLS and the new XLSX format. It guesses the format from the extension of the file being read:
read_excel("data.xlsx")
Excel files sometimes have multiple sheets. For example, the following Excel file has multiple sheets:

You can easily handle them with the readxl package. To see the number of sheets in the Excel document, use the excel_sheets command:
excel_sheets("data.xlsx")
#1> [i] "sheet1" "sheet2"
We can also specify which sheet should be accessed by using read_excel with the sheet argument:
read_excel("data.xlsx", sheet= 1)
To access a particular sheet of Excel, the sheet parameter is used:
read_excel("data.xlsx", sheet= "sheet1")
- Ansible Configuration Management
- Google Cloud Platform Cookbook
- 西門子S7-200 SMART PLC從入門到精通
- ROS機器人編程與SLAM算法解析指南
- Hands-On Machine Learning with TensorFlow.js
- 網(wǎng)絡(luò)綜合布線技術(shù)
- 西門子S7-200 SMART PLC實例指導(dǎo)學(xué)與用
- 21天學(xué)通Visual C++
- Visual Basic.NET程序設(shè)計
- The Python Workshop
- 嵌入式Linux系統(tǒng)實用開發(fā)
- Linux系統(tǒng)下C程序開發(fā)詳解
- 手把手教你學(xué)Flash CS3
- Puppet 3 Beginner’s Guide
- 大數(shù)據(jù)素質(zhì)讀本