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", ... )
data
: data.frame or tibbleguess_type
: logical to guess type with readrcol_types
: specify col_types using readr semantics. Ignored if guess_type is TRUElocale
: option to specify locale. Defaults to readr::default_locale().ignore.vars
: specify column names of columns to ignore when parsing...
: ignoreddata.frame or tibble
mtcars |> parse_data() |> str()
Useful links