Merges (full join) two data frames and preserve value and variable labels.
Usage
merge_df(x1, x2, id = NULL)
Arguments
x1
First data frame to be merged.
x2
Second data frame to be merged.
id
Optional name for ID column that will be created to indicate the
source data frames for appended rows.
Value
A full joined data frame.
Details
This function merges two data frames, where equal named columns
will be joined together. This function is a convenient wrapper for
merge(x1, x2, all = TRUE), however, unlike base
merge, this function preserves value and
variable labels. If matching columns have different value
label attributes, attributes from first data frame will be
used. For more details on the join operation, see
'Details' in merge on all-argument.