Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

matchNamesWithReverseParts

Value Matching with optional reversing of sub-parts of non-matching elements


Description

This function provides a variant to match, where initially non-matching elements of x will be tested by decomposing non-matching elements, reversing the parts in front and after the separator sep and re-matching. If separator sep does not occur, a warning will be issued, if it occurs more than once, the parts before and after the first separartor will be used and a warning issued.

Usage

matchNamesWithReverseParts(x, y, sep = "-", silent = FALSE, callFrom = NULL)

Arguments

x

(character) first vector for match

y

(character) second vector for match

sep

(character) separator between elements

silent

(logical) suppress messages

callFrom

(character) allow easier tracking of message(s) produced

Value

index for matching (integer) x to y

See Also

Examples

tx1 <- c("a-b","a-c","d-a","d-b","b-c","d-c")
tmp <- triCoord(4)
tx2 <- paste(letters[tmp[,1]],letters[tmp[,2]],sep="-")
## Some matches won't be found, since 'a-d' got reversed to 'd-a', etc... 
match(tx1,tx1)  
matchNamesWithReverseParts(tx1,tx2)

wrMisc

Analyze Experimental High-Throughput (Omics) Data

v1.5.4
GPL-3
Authors
Wolfgang Raffelsberger [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.