read_excel_sheets: Read multiple sheets from an excel workbook

Description Usage Arguments Value Examples

Description

The motivation behind this function is cases where an excel workbook contains a number of sheets in the same format, where each sheet in effect represents a variable.

Usage

1
read_excel_sheets(x, ignore = NULL, bind = TRUE, ...)

Arguments

x

An excel workbook.

ignore

A vector of sheet names to ignore.

bind

If TRUE then return a single data frame with id column 'Sheet'. Otherwise returns a list of data frames.

...

Additional arguments to be passed to read_excel.

Value

Reads all sheets from an excel file into R as a single data frame, or if bind = FALSE a list of data frames.

Examples

1
2
3
4
5
6
7
# Download Guardian university league table spreadsheet and save to desktop.
# https://docs.google.com/spreadsheets/d/1P1AiFGB5UFO0v26Ufe_3YNOT4lISK6DAaC8dvDRiVzs/edit#gid=1544561606

read_excel_sheets(x = "~/Desktop/Guardian University Guide 2018.xlsx",
  ignore = c('Institutional', 'Sheet2', 'Sheet3'),
  skip = 1,
  n_max = 159)

leebunce/leebunce documentation built on May 20, 2019, 4:06 p.m.