-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
checking of data.table
in ... vs setclass
#336
Comments
data.table
in ... to setclass
data.table
in ... into setclass
As a background, The checking in x1 <- tempfile(fileext = ".csv")
rio::export(mtcars, file = x1)
y1 <- rio::import(x1, data.table = TRUE)
class(y1)
#> [1] "data.table" "data.frame"
x2 <- tempfile(fileext = ".ods")
rio::export(mtcars, file = x2)
y2 <- rio::import(x2, data.table = TRUE)
#> Warning in .import.rio_ods(file = file, ...): The following arguments were ignored for read_ods:
#> data.table
class(y2)
#> [1] "data.table" "data.frame" Created on 2023-09-04 with reprex v2.0.2 What I wanted to argue here is that it is almost impossible to chase and override all of them. How about we just let |
Another option is to ditch I can imagine a lot of code has been written with e.g. datalorax/equatiomatic#39 (comment) paul-buerkner/brms#847 (comment) And it's probably a better idea to get rid of an undocumented feature (the overridding |
data.table
in ... into setclass
data.table
in ... into setclass
data.table
in ... into setclass
data.table
in ... vs setclass
Here is my opinion after looking at the code (but without knowing how people tend to use the function, and not knowing much of the history of rio yet): |
So that one can set the default class: And ditch the checking of |
yes |
Lines 134 to 136 in 81c0423
This check is weird (rds, rdata, and json to skip What should be checked is |
|
Another place where I forgot |
rio/R/import.R
Lines 141 to 158 in 067a0ae
rio/R/import_list.R
Lines 128 to 147 in 067a0ae
It's kind of out of context to do this inside
import()
andimport_list()
The text was updated successfully, but these errors were encountered: