Open shahronak47 opened 1 week ago
This behavior appears to happen only for the letters D, E, F, L & S (upper or lower case). E makes sense.
res <- purrr::map_chr(
.x = LETTERS,
.f = \(x) {
d <- readr::type_convert(
df = data.frame(
x = glue::glue("1176413{letter}03",letter = x)
)
)
class(d$x)
}
)
setNames(res,LETTERS)
> setNames(res,LETTERS)
A B C D E F
"character" "character" "character" "numeric" "numeric" "numeric"
G H I J K L
"character" "character" "character" "character" "character" "numeric"
M N O P Q R
"character" "character" "character" "character" "character" "character"
S T U V W X
"numeric" "character" "character" "character" "character" "character"
Y Z
"character" "character"
Why does these values get converted into numeric when using
readr::type_convert
? I would expect them to stay characters.