This function allows matching which groups are cited in a pairwise concatenated manner.
This function can also be used to split concatenated group-names (while automatically determining a suitable separator) and display as matrix when includeGrp=TRUE.
Replaces matchSampToPairw() ???
indexGroupsFromPW(
compNames,
grp = NULL,
potSep = c("-", "---", "_", "___", ".", " ", " ", "--", "__"),
includeGrp = FALSE,
silent = FALSE,
debug = FALSE,
callFrom = NULL
)This function returns a numeric matrix with indexes corresponding to (sorted) group-names as they appear in compNames;
or if includeGrp=TRUE a list with $ind (matrix indexes for each compNames), $GrpNames (group-names corresponding to index), $sep (separator used to split) and $grpTy (sorted names of types of groups)
(vector of character or integer, or matrix) names of pairwise combined group-names; if matrix the rownames of compNames will be used
(character or factor) optional groups (may include group-names that do not occur in compNames)
(character) potential separators to be checked if occuring in useComp; the first fitting will used
(logical) instead of matrix, rather return list with $ind, $GrpNames (group-names corresponding to index), $sep (separator used to split) and $grpTy
(logical) suppress messages
(logical) additional messages for debugging
(character) allow easier tracking of messages produced
moderTestXgrp (colnames of testing results from this function may be used); replacePWseparator; getPWseparator used internally .getPWseparator
indexGroupsFromPW(c("C-B","B-D","C-D"))
indexGroupsFromPW(c("C-B","B-D","C-D"), grp=rep(LETTERS[1:6],2), includeGrp=TRUE)
Run the code above in your browser using DataLab