Usage
dMerge(data1, data2, by, Var, dropDups = TRUE, dupsOut = FALSE, fromLast = FALSE, all = FALSE, all.x = all, all.y = all, sort = TRUE, suffixes = c(".x", ".y"), incomparables = NULL)
Arguments
data1
a data frame. The first data frame to merge.
data2
a data frame. The second data frame to merge.
by
specifications of the columns used for merging.
dropDups
logical. Whether or not to drop duplicated rows based on
Var
. If dropDups = FALSE
then it gives a count of the
duplicated rows.
dupsOut
logical. If TRUE
then a data frame only containing
duplicated values is returned and dropDups
is ignored.
fromLast
logical indicating if duplication should be considered from
the reverse side. Only relevant if dropDups = TRUE
.
all
logical; all = L is shorthand for all.x = L
and
all.y = L
, where L
is either TRUE
or FALSE
.
all.x
logical; if TRUE, then extra rows will be added to the output,
one for each row in x that has no matching row in y. These rows will have
NA
s in those columns that are usually filled with values from y. The
default is #' FALSE
, so that only rows with data from both x and y are
included in the output.
all.y
logical; analogous to all.x
.
sort
logical. Should the result be sorted on the by columns?
suffixes
a character vector of length 2 specifying the suffixes to be
used for making unique the names of columns in the result which not used for
merging (appearing in by etc).
incomparables
values which cannot be matched. See match
.