dtColMatch: Match two data-tables on multiple columns

dtColMatchR Documentation

Match two data-tables on multiple columns

Description

Returns vector with column-of-interest where columns match

Usage

dtColMatch(
  input,
  input_match_on,
  reference,
  reference_match_on,
  reference_return
)

Arguments

input

Data.table (required): input-table to match

input_match_on

Character vector (required): column-names in input-table to match

reference

Data.table (required): reference-table to match

reference_match_on

Character vector (required): column-names in reference-table to match

reference_return

Character string (required): column-name in reference-table that is returned (where values match)

Details

If at least one value in any of the input_match_on columns matches with a value in any of the reference_match_on columns, the two rows will match

Value

Character vector with values from reference_return column in reference_match_on data.table where values match

Examples

dtColMatch (data.global, c("Country"), data.countryname,
  c("name1", "name2", "name3", "name4"), "iso3")


lshtm-vimc/prime documentation built on April 21, 2024, 3:21 a.m.