Enhanced functionality of 'mult' argument

Open
#1,260 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
data

Research direction

Start by locating the existing implementation and tests for the mult argument in data.table, then read the related discussions in issues #651, #655, and #1233. Clarify the intended behavior for each listed value before changing anything; done means the supported options work consistently and the corresponding tests cover them.

Written by the indexing model from the issue text.

Description

enhancement feature request joins

This is a merge of issues #651, #655 and #1233 since they are very much related. Will close all the other issues.

Note: Remember to thank @MuhammadWaliji and @MichaelChirico for filing those FRs.

Enhanced functionality for mult = argument:

From #651:

  • 1L - similar to "first"
  • .N - similar to "last"
  • "sample" - 'random' - sample(.N, size = 1L)
  • -1L - all but first
  • c(FALSE, TRUE) - even rows

See this link for more info from the data.table mailing list. Also refer to #651 if necessary.

  • 'error' - Error when any multiple matches are found. (#655)
  • 'none' or 0L? - don't return multiple matches. (#1233)
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.