multimatch: Match with multiple matching possible.

Description Usage Arguments Value Author(s) Examples

View source: R/multimatch.R

Description

Function to represent results of matching when each query argument may match multiple elements in the target.

Usage

1
multimatch(query, target, values, sep = ",", use.unique = TRUE)

Arguments

query

Vector of values to be matched.

target

Vector of values that query is to be matched against.

values

Vector of values to be returned for matches in target.

sep

Character to separate values for multiple matches.

use.unique

Logical flag indicating whether to return unique set of values only.

Value

A character vector of length length(query).

Author(s)

Toby Johnson Toby.x.Johnson@gsk.com

Examples

1
2
3
4
bmidata <- data.frame(subject = c("A001", "A002", "A003", "A003"),
                      year = c(2001, 2001, 2001, 2005),
                      bmi = c(21.3, 29.7, 25.5, 22.3))
multimatch(c("A002", "A003"), bmidata$subject, bmidata$bmi)

tobyjohnson/gtx documentation built on Aug. 30, 2019, 8:07 p.m.