right_join_warn {CellaRepertorium}R Documentation

Perform a dplyr::left_join() but check for non-key overlapping fields

Description

Perform a dplyr join, but either warn if the two tables share non-key fields If overwrite = TRUE, then shared columns will pull from x otherwise a suffix will be added to y. To perform this check, by must be specified, and it is an error if it is not.

Usage

right_join_warn(...)

left_join_warn(x, y, by, overwrite = FALSE, join = left_join, ...)

Arguments

...

passed to joining function

x

A pair of data frames, data frame extensions (e.g. a tibble), or lazy data frames (e.g. from dbplyr or dtplyr). See Methods, below, for more details.

y

A pair of data frames, data frame extensions (e.g. a tibble), or lazy data frames (e.g. from dbplyr or dtplyr). See Methods, below, for more details.

by

character specifying columns in x and y to key on.

overwrite

logical – should non-key fields in y be overwritten using x, or should a suffix (".y") be added

join

function giving the type of join to perform, eg, left, right, inner, outer.

Value

data.frame or tibble

Functions

Examples

left_join_warn(mtcars, mtcars, by  = 'mpg')
left_join_warn(mtcars, mtcars, by = 'mpg', overwrite = TRUE)

[Package CellaRepertorium version 1.3.1 Index]