tidy_excel: Import Tidy Excel Sheets into R

Description Usage Arguments Details Value See Also Examples

View source: R/tidy_excel.R

Description

Import Tidy Excel Sheets into R

Usage

1
2
tidy_excel(file, flatten = FALSE, col_names, col_types, na, trim_ws,
  skip, ...)

Arguments

file

.xls or .xlsx file

flatten

should output be displayed in tidy format for TRUE?

col_names

TRUE to use the first row as column names, FALSE to get default names

col_types

Default as NULL to guess all from the spreadsheet or a character vector containing one entry per column from these options: "skip", "guess", "logical", "numeric", "date", "text" or "list".

na

Character vector of strings to interpret as missing values. By default, readxl treats blank cells as missing data

trim_ws

Should leading and trailing whitespace be trimmed?

skip

Minimum number of rows to skip before reading anything, be it column names or data. Leading empty rows are automatically skipped, so this is a lower bound. Ignored if range is given.

...

other arguments to pass down to read_excel

Details

This function wraps the steps for importing excel files having more than 1 sheet through mutate() a sheetName column after intermediate iterations of sheet names via map(). For excel files that have a single sheet, they are dealt by readxl() with default arguments. sheetName column will therefore be omitted.

Value

A tibble

See Also

read_excel

Examples

1
2
library(readxl)
tidy_excel(readxl_example("type-me.xlsx"))

chuckleong21/doEDA documentation built on Nov. 4, 2019, 8:52 a.m.