apply built-in R merge but with additional features:
mergeBetter(x, y, by.x, by.y, all.x = FALSE, all.y = FALSE, affix = NULL,
renameConflict = c("suffix", "prefix"), renameAll = c("no", "suffix",
"prefix"), convert_factors = TRUE, verbose = FALSE)
data frame
data frame
field in x to merge on. Unlike merge
, this is compulsory.
field in y to merge on. Unlike merge
, this is compulsory.
outer join to keep all x values
outer join to keep all y values
either prefix or suffix to disambiguate files. By default, this
is the name of the table specified in y
. In all other respects in
this function, x
and y
are symmetric.
- determines whether prefix or suffix is added to disambiguate conflicting column names. Value can be "suffix", "prefix". Suffix is the default.
- regardless of column name clashes, "prefix" or "suffix" with every field with original table name, or "no" for neither
Default is TRUE which causes factors to be converted to character before merge. This is almost certainly safer.
logical or numbers 0, 1 or 2. 1 or TRUE will give moderate verbosity, 2 will give full verbosity. 0 or FALSE turns off all messages.
merged data frame