Guess the column type
guess_col_type.Rd
uses column class to set readr column type
Arguments
- data
data.frame Data who column types you would like to guess
- default_col_abv
string. Column type abbreviation from
readr::cols()
. Use "g" to guess the column type.
Examples
data <- data.frame(time = Sys.time(),
char = "hello", num = 1, log = TRUE,
date = Sys.Date(), list_col = list("hello") )
guess_col_type(data)
#> time char num log date X.hello.
#> "T" "c" "n" "l" "D" "c"
## change default value of default column abbreviation
guess_col_type(data, default_col_abv = "g")
#> time char num log date X.hello.
#> "T" "c" "n" "l" "D" "c"