merge.repl: merging data tables with collapsing columns with the same...

merge.replR Documentation

merging data tables with collapsing columns with the same name

Description

Merge two data tables with various replacing strategies for columns common between x and y that are not used to merge (i.e. not specified in the "by" argument)

Usage

## S3 method for class 'repl'
merge(
  dt.x,
  dt.y,
  sep = "_",
  replace_NA = TRUE,
  force_y = TRUE,
  overwrite_x = FALSE,
  keep_order = FALSE,
  keep_colorder = TRUE,
  keep_factor = TRUE,
  ...
)

Arguments

replace_NA

logical, only use values in dt.y, any dt.x not in dt.y is clobbered (NA)

force_y

logical, should x and y common columns be merged?

overwrite_x

logical, if force_y = TRUE, should NA values in y replace x?

Value

A data.table


kevinmhadi/khtools documentation built on Jan. 16, 2025, 4:18 p.m.