makeMerge: makeMerge

Description Usage Arguments Value Examples

View source: R/makeMerge.R

Description

Creates a a data set consisting of all variables according to the matching results

Usage

1
makeMerge(data, files, full = FALSE, duplicates.ok = FALSE, ...)

Arguments

data

list of data frames

files

list of files which contain the actual matches

full

logical: return full data set (non-matching are observations are filels with NA) or just matched obs, defaults to FALSE

duplicates.ok

logical: Are duplicates ok, defaults ton FALSE

...

further parameters given to import for importing match data

Value

a data frame with merged data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
set.seed(0)
# create two data sets where the second consists of
# 200 obs. only in t1, 200 obs. in t1 and t2 and
# 100 obs. only in t2
n <- list(c(200, 1), c(200, 1, 2), c(100, 2))
x <- generateTestData(n)
#
match <- findMatch(x, c('code', 'code'))
head(match)
## Not run: 
exportMatch(match, 'match.xlsx')
# creates an error since we have duplicate matches
data <- makeMerge(x, 'match.xlsx')

## End(Not run)

sigbertklinke/findMatch documentation built on July 12, 2019, 9:22 a.m.