parse_data function

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

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

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

Returns

data.frame or tibble

Examples

mtcars |> parse_data() |> str()