I just updated the readr
package from version 0.1.1 to 0.2.0 but now an operation that worked before throws an error.
Before updating I did this using the readr
package:
file.list <- list.files(<path>, pattern='*.csv')
df.list <- lapply(file.list, read_csv2)
df.list <- lapply(df.list, function(x) x[-1,])
The last step is necessary because I have some long headers with special characters that somehow cause an extra line to be read. This is another issue, but simply deleting the first row had worked till then.
read_csv2
warns me about the issue with the column names but, as said, this I fixed by just deleting the row:
Warning: 1 parsing failure.
row col expected actual
1 -- 227 columns 222 columns
I then went on to bind all data frames into one using dplyr::bind_rows
(as each .csv has identical headers). This worked perfectly before but now when I do this I get
> full.data <- bind_rows(df.list)
Error: corrupt data frame
I have not changed anything else (same R version, same RStudio version, no other package was updated). Anyone experienced anything similar? Has any dramtic change been made compared to version 0.1.1 in the way read_csv2 works.
Thanks