I am trying to read a file in chunks and specify the col_types
, see MWE
write.csv(cars, "cars.csv")
library(readr)
readr::read_delim_chunked("cars.csv", function(x, i) {
x
}, delim= ",", col_types = cols(
speed = col_character()
), chunk_size = 10)
but I get erroneous output
NULL
but the non-chunked version works fine
library(readr)
readr::read_delim("cars.csv", delim= ",", col_types = cols(
speed = col_character()
))