Return length of overlap in foverlaps

Open
#1,975 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start with the foverlaps entry point and its existing minoverlap handling, which is noted as not yet implemented. Review how overlap widths are calculated and determine the API and expected behavior for returning those lengths; done means the requested overlap lengths are returned without changing the default behavior, with tests covering the new option.

Written by the indexing model from the issue text.

Description

feature request non-equi joins

From the not yet implemented argument minoverlap in foverlaps: "...length of overlap between these two intervals is...".

Given that the length of overlaps will be calculated anyway when minoverlap eventually is implemented, wouldn't it be nice to be able to return these lengths, perhaps through an additional argument like e.g. lengthoverlaps = FALSE (default) / TRUE?

I have seen quite a few posts on such overlap widths in genomics (calculated using functions in GenomicRanges, e.g. here, here, and here) and in posts on overlapping date ranges.

I wish to take the opportunity to thank everyone in the data.table team for your fantastic work!

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.