disk.frame
disk.frame copied to clipboard
csv_to_disk.frame gives warning whenever multiple files are used
When passing multiple files to csv_to_disk.frame, a warning is always thrown about needing column classes, even if column classes are provided as a parameter. This is ultimately confusing to the user.
It looks like an earlier version of the csv_to_disk.frame function relied on a param_names variable that no longer exists. That variable captured the dots, which is how I would recommend doing it. Given that the code was commented out, I am not sure if this raised some other issue or is just in flux.
See the relevant code here:
if(length(infile)>1) {
message("csv_to_disk.frame: you are trying to read multiple files.")
#param_names = names(list(...))
if(backend == "data.table") {
#if (!"colClasses" %in% param_names) {
message("Please use colClasses to set column types to minimize the chance of a failed read")
#}
} else if (backend == "readr") {
#if (!"col_types" %in% param_names) {
message("Please use col_types to set column types to minimize the chance of a failed read")
#}
} else if (backend == "LaF") {
message("Please check the documentation of LaF for how to set column classes")
} else {
stop("csv_to_disk.frame: backend not supported")
}
}
It's a bit in flux. I need to up the code. Because they are messages the user can suppresses them. It can be annoying I know