pastedmatch: Match pasted IDs

Description Usage Arguments Value Author(s) References Examples

View source: R/pastedmatch.R

Description

This function matches (eventually e.g. “;” separated) entries in x with, also eventually separated values in y. The function returns TRUE for each element in x that is also present in y.

Usage

1
pastedmatch( x, y, split=";", fixed=TRUE )

Arguments

x

A character vector of (eventually) pasted ids.

y

Can also be a vector or a single character of pasted ids; it will be split prior to any comparisons.

split

The character that can/will be used to split the elements.

fixed

Uses the split argument as is.

Value

A logical vector with the same length than x, TRUE if any (sub) element in x is also present (as a sub-element) in y.

Author(s)

Johannes Rainer

References

http://bioinfo.i-med.ac.at

Examples

1
2
3
4
5
6
7
x <- c( "123;343", "1543;243", "243", "1443", "313;321" )
y <- c( "123", "1443", "243" )

pastedmatch( x, y )

y.string <- "1443;321;232"
pastedmatch( x, y.string )

jotsetung/unsoRted documentation built on May 19, 2019, 9:42 p.m.