You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thank you for the excellent package! I am having some problems with expected != actual columns after reading a .csv file. I've narrowed it down to only experiencing the problems reading the original compressed .zip archive of the file, rather than the manually decompressed .csv file.
library(vroom)
# download zipped dataurl<-"https://data.bls.gov/cew/data/files/2017/csv/2017_qtrly_singlefile.zip"temp_dir<- tempdir()
data_zip<- tempfile(tmpdir=temp_dir, fileext=".zip")
download.file(url, data_zip)
# decompress datacsv_basename<- unzip(data_zip, list=TRUE)$Name[1]
unzip(data_zip, files=csv_basename, exdir=temp_dir, overwrite=TRUE)
data_csv<- file.path(temp_dir, csv_basename)
# confirm problems with zip file onlyvroom_from_zip<- vroom(data_zip)
problems(vroom_from_zip)
# A tibble: 1,058 x 5rowcolexpectedactualfile<int><int><chr><chr><chr>123342columns33columns""223342columns33columns""323342columns33columns""423342columns33columns""523342columns33columns""623342columns33columns""723342columns33columns""823342columns33columns""923342columns33columns""1023342columns33columns""# … with 1,048 more rowsvroom_from_csv<- vroom(data_csv)
problems(vroom_from_csv)
# A tibble: 0 x 5# … with 5 variables: row <int>, col <int>, expected <chr>,# actual <chr>, file <chr>
Do you have any insights?
The text was updated successfully, but these errors were encountered:
Thank you for opening the issue and for supplying a reproducible example, it is a big help!
This was a recent regression when reading files from connections with windows line endings when the bytes of the line ending spanned two different connection buffers.
Hi, thank you for the excellent package! I am having some problems with expected != actual columns after reading a .csv file. I've narrowed it down to only experiencing the problems reading the original compressed .zip archive of the file, rather than the manually decompressed .csv file.
Do you have any insights?
The text was updated successfully, but these errors were encountered: