match_multi: Extension of the base 'match' function

View source: R/proteinRuler.R

match_multiR Documentation

Extension of the base 'match' function

Description

Extension of the base 'match' function to the case where elements of x and y can contain multiple items to be matched. Only the first match for each x element is returned.

Usage

match_multi(x, y, sep_y = ";", sep_x = NULL)

Arguments

x

a character vector

y

a character vector

sep_y

character separating different items to be matched in a given y element

sep_x

character separating different items to be matched in a given x element

Value

a numeric vector with matching indices

Examples

x <- c("a;aa", "b")
y <- c( "bb", "c;b", "aa", "c;a;b")
match_multi(x=x, y=y, sep_y = ";")

VoisinneG/proteinRuler documentation built on Oct. 13, 2022, 9:47 p.m.