Skip to contents

Helper to auto-parse un-formatted data with haven and readr

Usage

parse_data(
  data,
  guess_type = TRUE,
  col_types = NULL,
  locale = readr::default_locale(),
  ignore.vars = "cpr",
  ...
)

Arguments

data

data.frame or tibble

guess_type

logical to guess type with readr

col_types

specify col_types using readr semantics. Ignored if guess_type is TRUE

locale

option to specify locale. Defaults to readr::default_locale().

ignore.vars

specify column names of columns to ignore when parsing

...

ignored

Value

data.frame or tibble

Examples

if (FALSE) { # \dontrun{
mtcars |>
  parse_data() |>
  str()
} # }