match1to2: Match and combine 2 datasets

View source: R/utilities.R

match1to2R Documentation

Match and combine 2 datasets

Description

Orders 2 datasets on corresponding variables, then appends an NA matrix as needed before binding on columns. This is mainly used to combine different types of sample metadata on common/shared GSM IDs. Note columns should be matchable after calling 'as.character()' for each.

Usage

match1to2(d1, d2, ci1 = 2, ci2 = 1)

Arguments

d1

First set to combine (matrix).

d2

Second set to combine (matrix).

ci1

Column index in first dataset to match on

ci2

Column index in second dataset to match on

Value

Union of the 2 datasets, including NA values where appropriate.


metamaden/rmpipeline documentation built on Jan. 12, 2023, 3:20 p.m.