Learn R Programming

wrMisc (version 1.5.2)

matchSampToPairw: Match names to concatenated pairs of names

Description

The column-names of multiple pairwise testing contain the names of the initial groups/conditions tested, plus there is a separator (eg '-' in moderTestXgrp). Thus function allows to map back which groups/conditions were used by returning the index of the respective groups used in pair-wise sets.

Usage

matchSampToPairw(grpNa, pairwNa, silent = FALSE, callFrom = NULL)

Arguments

grpNa

(character) the names of the groups of replicates (ie conditions) used to test

pairwNa

(character) the names of pairwise-testing (ie 'concatenated' sampNa

silent

(logical) suppress messages

callFrom

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

Value

matrix of 2 columns with inidices of sampNa with pairwNa as rows

Details

The names of initial groups/conditions (grpNa) will be tested for exact pattern matching either at beginning or at end of pair-wise names (pairwNa). If there is no 'perfect' fit, the names concerned will not get matched. Thus, it is not necessary to know what character(s) were used as separator when constructing the concatenated pair-wise names. If some grpNa are not found in pairwNa this will be marked as NA.

See Also

(for running multiple pair-wise test) moderTestXgrp

Examples

Run this code
# NOT RUN {
pairwNa1 <- c("abc-efg","abc-hij","efg-hij")
grpNa1 <- c("hij","abc","efg","klm")
matchSampToPairw(grpNa1, pairwNa1) 

pairwNa2 <- c("abc-efg","abc-hij","zz-zz","efg-hij")
matchSampToPairw(grpNa1, pairwNa2) 
# }

Run the code above in your browser using DataLab