Skip to content

output from merge #4677

Open
Open

Description

@thorek1

It would be great to have some output on the merge operation like:

  • Rows in x
  • Rows in y
  • Matched rows
  • Total rows after merge

This feature would make it easier to understand what happened.

A verbose option could do: merge(...,verbose = T) for example

Activity

  1. added
    joinsUse label:"non-equi joins" for rolling, overlapping, and non-equi joins
    non-equi joinsrolling, overlapping, non-equi joins
    on Aug 26, 2020
  2. changed the title [-]feature request: output from merge[/-] [+]output from merge[/+] on Aug 26, 2020
  3. added a commit that references this issue on Sep 22, 2020
  4. grantmcdermott commented on Dec 28, 2021

    @grantmcdermott
    Contributor

    I opened #5298 (now closed) before being flagged as a dup.

    Just to add that information about keys would be valuable too (see: #4888 and #4891).

    Also worth noting that the tidylog package largely provides this behaviour for dplyr joins.

    library(dplyr, warn.conflicts = FALSE)
    library(tidylog, warn.conflicts = FALSE)
    
    x = data.frame(A = 1:5, B = 6:10)
    y = data.frame(A = c(1, 4), C = LETTERS[c(1, 4)])
    
    left_join(x, y)
    #> Joining, by = "A"
    #> left_join: added one column (C)
    #>            > rows only in x   3
    #>            > rows only in y  (0)
    #>            > matched rows     2
    #>            >                 ===
    #>            > rows total       5
    #>   A  B    C
    #> 1 1  6    A
    #> 2 2  7 <NA>
    #> 3 3  8 <NA>
    #> 4 4  9    D
    #> 5 5 10 <NA>

    Created on 2021-12-27 by the reprex package (v2.0.1)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestjoinsUse label:"non-equi joins" for rolling, overlapping, and non-equi joinsnon-equi joinsrolling, overlapping, non-equi joinstop requestOne of our most-requested issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions