% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/indexGroupsFromPW.R
\name{indexGroupsFromPW}
\alias{indexGroupsFromPW}
\title{Index Names Of Groups From Vector Of Concatenated Pairwise Group-Names}
\usage{
indexGroupsFromPW(
  compNames,
  grp = NULL,
  potSep = pwSeparatorList("combine1"),
  includeGrp = FALSE,
  silent = FALSE,
  debug = FALSE,
  callFrom = NULL
)
}
\arguments{
\item{compNames}{(vector of character or integer, or matrix) names of pairwise combined group-names; if matrix the rownames of \code{compNames} will be used}

\item{grp}{(character or factor) optional groups (may include group-names that do not occur in \code{compNames})}

\item{potSep}{(character) potential separators to be checked if occuring in \code{useComp}; the first fitting will used}

\item{includeGrp}{(logical) instead of matrix, rather return list with $pwInd, $pwGrpNames (group-names corresponding to index), $sep (separator used to split) and $grpNa}

\item{silent}{(logical) suppress messages}

\item{debug}{(logical) additional messages for debugging}

\item{callFrom}{(character) allow easier tracking of messages produced}
}
\value{
This function returns a numeric matrix with indexes corresponding to (sorted) group-names as they appear in \code{compNames};
  or if \code{includeGrp=TRUE} a list with $ind (matrix indexes for each \code{compNames}), $grpNames (group-names corresponding to index), $sep (separator used to split) and $grpNa (sorted names of types of groups)
}
\description{
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 \code{includeGrp=TRUE}.
Replaces matchSampToPairw() ???
}
\examples{
indexGroupsFromPW(c("C-B","B-D","C-D")) 
indexGroupsFromPW(c("C-B","B-D","C-D"), grp=rep(LETTERS[1:6],2), includeGrp=TRUE) 
}
\seealso{
\code{\link{moderTestXgrp}} (colnames of testing results from this function may be used); \code{\link{replacePWseparator}}; used internally \code{\link{getPWseparator}},  \code{\link{pwSeparatorList}}, \code{\link{.getPWseparator}}
}
