summarise_join_stats: Calculate how "well" two 'data.frame's joined

Description Usage Arguments Details Value See Also

View source: R/join.R

Description

Calculates the join count and percentage (by number of rows missing) of a data.frame that is the results of a join.

Usage

1

Arguments

data

data.frame. This should already by the result of a join.

x, y

Either characters or bare names of columns in data on which to compute metrics.

Details

This function is mostly useful after calling dplyr::full_join() (or a similar function), although it can also be useful for dplyr::left_join() #' or dplyr::right_join().

The logic for handling x and y as strings/quos was borrowed from a previous version of tidyr::gather().

Value

A tibble. One line summary of join metrics, including the following columns: x, n_x, n_x_unjoined, x_in_y_pct and their y analogues, as well as n_joined.

See Also

https://github.com/tidyverse/tidyr/blob/master/R/gather.R provides some insight for how to make the function accept either characters or bare names for the column names.


tonyelhabr/tetidy documentation built on May 29, 2019, 3:18 p.m.