merge_dupUpdate: Merge table and update values for duplicate column

Description Usage Arguments Value Author(s) See Also

Description

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

Usage

1
2
3
4
5
6
7
8
9
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/BCForestGroundSample documentation built on May 25, 2019, 3:21 p.m.