Deprecate %notin%

Open
#7,453 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
r
Domain
data

Research direction

Start by reading the linked R base match.R change and the discussion in #7446, then review how data.table currently defines and exports %notin%. Check the stated CRAN dependents and determine what a deprecation plan should look like once R includes the operator in a release; the issue does not yet define a concrete implementation or completion test.

Written by the indexing model from the issue text.

Description

breaking-change

R itself recently started exporting a %notin% operator:

https://github.com/r-devel/r-svn/blob/80be987b9999121e8b9f371562c5b61356a2e25a/src/library/base/R/match.R#L40

That collides with our own %notin%:

@aitap in #7446 mentioned some ideas for this deprecation process, which will be new to us:

Three CRAN packages import %notin%: bruceR, tidyfst, and weatherOz; the first two for re-exporting. Any clever tricks (à la cedta?) we might use so that interactive users who would get base::`%notin%` anyway will not get penalised? I see that some packages (e.g. backports) export objects conditionally on R version. Should we try to eventually use if (getRversion() < "4.6.0")) export("%notin%") and similarly emit deprecation warnings only on R ≥ 4.6.0?

I would like to see R commit to including it in a release before we do anything too drastic.

Dominant language
R
Stars
3.9k
Forks
1.1k
Avg merge
14h 4m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Rdatatable/data.table

All issues in Rdatatable/data.table

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.