View source: R/matchSampToPairw.R
| matchSampToPairw | R Documentation |
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.
matchSampToPairw(
grpNa,
pairwNa,
sep = NULL,
silent = FALSE,
debug = FALSE,
callFrom = NULL
)
grpNa |
(character) the names of the groups of replicates (ie conditions) used to test |
pairwNa |
(character) the names of pairwise-testing (ie 'concatenated' |
sep |
(character) if not |
silent |
(logical) suppress messages |
debug |
(logical) additional messages for debugging |
callFrom |
(character) allow easier tracking of messages produced |
There are two modes of operation : 1) Argument sep is set to NULL : 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).
This approach has the advantage that it does not need to be known what character(s) were used as separator (or they may change),
but the disadvantage that in case the perfect grpNa was not given, the longest best match of grpNa will be returned.
2) The separator sep is given and exact matches at both sides will be searched.
However, if the character(s) from sep do appear inside grpNa no matches will be found.
If some grpNa are not found in pairwNa this will be marked as NA.
matrix of 2 columns with inidices of sampNa with pairwNa as rows
(for running multiple pair-wise test) moderTestXgrp, grep, strsplit
pairwNa1 <- c("abc-efg","abc-hij","efg-hij")
grpNa1 <- c("hij","abc","abcc","efg","klm")
matchSampToPairw(grpNa1, pairwNa1)
pairwNa2 <- c("abc-efg","abcc-hij","abc-hij","abc-hijj","zz-zz","efg-hij")
matchSampToPairw(grpNa1, pairwNa2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.