FR: make unique = TRUE default for CJ

Open
#3,297 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
data

Research direction

Start at the CJ entry point and read the linked original issue and 1.9.6 news entry for the intended history of the unique parameter. Check how CJ currently handles its default and identify the existing coverage around unique values. Done means CJ defaults to unique = TRUE while preserving the explicit FALSE behavior.

Written by the indexing model from the issue text.

Description

breaking-change

The unique-parameter of CJ was initially set to FALSE when introduced. The relevant item in the newsfile when 1.9.6 was released said:

CJ gains logical unique argument with default FALSE. If TRUE, unique values of vectors are automatically computed and used. This is convenient, for example, DT[CJ(a, b, c, unique=TRUE)] instead of doing DT[CJ(unique(a), unique(b), unique(c))]. Ultimately, unique = TRUE will be default. Closes #1148.

As CJ is probably mostly used used with unique = TRUE (see also the original issue), maybe the time has come to set this parameter to unique = TRUE ?

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.