ut.merge: Merge databases

Description Usage Arguments Details

Description

Provides a function simular to merge in Stata to merge data from two data.frames.

Usage

1
ut.merge(mergeParam, db1, db2, entries1, entries2)

Arguments

mergeParam

A vector of column names to use to merge data

db1, db2

The data.frames to merge

entries1, entries2

1 or "m" to tell it whether to do 1:1, 1:m or m:1 matching between databases

Details

Merges 1:1, 1:M or M:1. M:M merging is not supported because this makes unfounded assumptions about the ordering of varaibles. It is better to specify an additional mergeParam column to merge with to explicitely asign M:M matches.

Returns a column named merged denoting 1 for db1, 2 for db2 and 3 for row found in both. Note this will overwrite previous merge columns if they exist.


finite2/peter.utilities documentation built on May 16, 2019, 12:54 p.m.