merge_dupUpdate: Merge table and update values for duplicate column

merge_dupUpdateR Documentation

Merge table and update values for duplicate column

Description

This is an extended function for merge function by updating values for duplicate column for the first, second or both tables.

Usage

merge_dupUpdate(x, y, by, updateDup, ...)

## S4 method for signature 'data.table,data.table,character,logical'
merge_dupUpdate(x, y, by, updateDup, ...)

## S4 method for signature 'data.table,data.table,character,missing'
merge_dupUpdate(x, y, by, updateDup, ...)

Arguments

x

data.table, The first table for merging.

y

data.table, The second table for merging.

by

character, The key to merge two tables.

updateDup

logical, Specifies whether update duplicate column in merged table when its information is available in y table, which means update from the second table. If missing, the function takes TRUE.

...

see merge for rest of arguments.

Value

A merged table without duplicate columes. A warning message is given if the duplicate column has different values.

Author(s)

Yong Luo

See Also

merge


bcgov/FAIBBase documentation built on June 19, 2024, 11:57 p.m.