Skip to contents

Reading a spreadsheet. A workbook holds several tables, so which one is the only thing that must be said.

Usage

setup_XLSXIngest(
  columns = NULL,
  character2factor = TRUE,
  clean_colnames = TRUE,
  remove_duplicates = FALSE,
  sheet = 1L,
  na_strings = ""
)

Arguments

columns

Optional Named vector: Declared column types, keyed by column name, in the profile/r/v1 vocabulary – c(Age = "integer"). A column named here is converted to that type after reading, so a known type takes precedence over the reader's inference.

character2factor

Logical: If TRUE, read character columns as factors.

clean_colnames

Logical: If TRUE, normalize column names.

remove_duplicates

Logical: If TRUE, drop rows repeating an earlier row.

sheet

Integer [1, Inf): Sheet number to read.

na_strings

Character vector: Strings to read as missing.

Value

XLSXIngestConfig object.

Author

EDG

Examples

setup_XLSXIngest(sheet = 2L)
#> <XLSXIngestConfig>
#> 
#>              format: <chr> xlsx
#>             columns: <NUL> NULL
#>    character2factor: <lgc> TRUE
#>      clean_colnames: <lgc> TRUE
#>   remove_duplicates: <lgc> FALSE
#>               sheet: <int> 2
#>          na_strings: <chr> 
#>