Skip to content

Move data.table to Imports:#404

Closed
MichaelChirico wants to merge 1 commit intoimmunomind:masterfrom
MichaelChirico:dt-imports
Closed

Move data.table to Imports:#404
MichaelChirico wants to merge 1 commit intoimmunomind:masterfrom
MichaelChirico:dt-imports

Conversation

@MichaelChirico
Copy link

Depends are discouraged for data.table:

Rdatatable/data.table#3076

(in fact, we hope that R will eventually deprecate this mode of dependency)

I used {lintr} to find all {data.table} usages in your package.

dt_exports <- getNamespaceExports("data.table")
dt_functions <- grep("^[a-zA-Z]", dt_exports, value=TRUE)
dt_operators <- grep("^[%]", dt_exports, value=TRUE)
lintr::lint_package(linters = list(
  lintr::undesirable_function_linter(setNames(nm = dt_functions)),
  lintr::undesirable_operator_linter(setNames(nm = dt_operators))
))

I added some qualifications of functions like melt() and first() that are also exported also by data.table to clarify their source, but could revert this if seen fit.

The qualifications in tests are needed as {data.table} is no longer attached for those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants