Learn R Programming

rtemis (version 1.4.3)

setup_DelimitedIngest: Set up a DelimitedIngestConfig

Description

Creates the settings ingest() uses to read a delimited file.

Each format has its own constructor, which takes the settings of that format only; an argument of another format is an unused-argument error.

Usage

setup_DelimitedIngest(
  columns = NULL,
  character2factor = TRUE,
  clean_colnames = TRUE,
  remove_duplicates = FALSE,
  reader = "data.table",
  sep = NULL,
  quote = "\"",
  na_strings = ""
)

Value

DelimitedIngestConfig object.

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 the declared type after reading, replacing the type the reader assigned.

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.

reader

Character {"data.table", "vroom", "duckdb", "arrow"}: Library used to read the file.

sep

Optional Character: Field separator. If NULL, the reader detects it.

quote

Character: Quote character.

na_strings

Character vector: Strings to read as missing.

Author

EDG

Examples

Run this code
setup_DelimitedIngest(sep = ";")

Run the code above in your browser using DataLab