read_table() miss reads numbers in the first column when there is white space at the start of enough lines at the top of the file.
Of the attached files the shorter readr-read-table.txt is correctly read, but the second and longer file readr-read-table-2.txt is incorrectly read, with 1000 interpreted as 0, 1001 as 1, etc.
readr::read_table("readr-read-table.txt", col_types = "dd")
readr::read_table("readr-read-table-2.txt", col_types = "dd")
readr-read-table.txt
readr-read-table-2.txt
I noticed a problem with some of my files some months ago, but I did not find the cause of the problem until yesterday. utils::read.table() has no problems with either of these files.
readr installed from this repository minutes ago. 1.0.0.9000
R 3.3.1 Windows 10 x64.
read_table()miss reads numbers in the first column when there is white space at the start of enough lines at the top of the file.Of the attached files the shorter
readr-read-table.txtis correctly read, but the second and longer filereadr-read-table-2.txtis incorrectly read, with 1000 interpreted as 0, 1001 as 1, etc.readr-read-table.txt
readr-read-table-2.txt
I noticed a problem with some of my files some months ago, but I did not find the cause of the problem until yesterday.
utils::read.table()has no problems with either of these files.readr installed from this repository minutes ago. 1.0.0.9000
R 3.3.1 Windows 10 x64.