Move data.table to Imports
Depends is rarely the right form of dependency; see e.g. https://cran.r-project.org/web/packages/data.table/vignettes/datatable-importing.html and https://github.com/Rdatatable/data.table/issues/3076.
Let me know if I can help with the migration!
Thanks for the feedback. What would be involved to migrate?
Possibly as little as moving data.table in the DESCRIPTION from Depends: to Imports:.
But usually it involves:
- Adding more specific imports to NAMESPACE, like
importFrom(data.table, ...). I find that most expressive to readers. Otherwise, a blanketimport(data.table)will be the low-effort change. - Vignettes, tests, and examples that use data.table functions need to be updated. The low-effort version is to add
library(data.table)to affected scripts, otherwise we would find the corresponding functions and qualify them withdata.table::
I would approach this by making the move in DESCRIPTION and then iterating R CMD check to find unqualified data.table usage.
One caveat is that if your package uses meta-programming like eval(parse(text = "data.table(...)")), that won't be caught by R CMD check, but would be caught if your test suite is extensive enough. YMMV.