% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getPWseparator.R
\name{getPWseparator}
\alias{getPWseparator}
\title{Identify Separator In Pairwise Group-Names Or Find Separator For Use With Pairwise Group-Names  
  
This function allows identifing separator used when pairwise groups are presented.}
\usage{
getPWseparator(
  compNames = NULL,
  grp = NULL,
  potSep = c("-", "---", "_", "___", ".", "-vs-", "_vs_", "--vs--", "__vs__", " ", "  ",
    "--", "__"),
  includeGrp = FALSE,
  silent = FALSE,
  debug = FALSE,
  callFrom = NULL
)
}
\arguments{
\item{compNames}{(character or integer) names of pairwise combined group-names}

\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) if \code{includeGrp=TRUE} a list including also the group-names is returned}

\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 character vector (length=1) of the (first) separator fitting to all data, or a list with $sep and $grpNa if \code{includeGrp=TRUE}
}
\description{
Identify Separator In Pairwise Group-Names Or Find Separator For Use With Pairwise Group-Names  
  
This function allows identifing separator used when pairwise groups are presented.
}
\details{
Note : Potential separators \code{potSep} must be at least 1 character long
  
The character '.' may used as separator (argument \code{potSep}), it will be protected internally for obtaining correct results when using grep().
Note : The indexing is relative to the levels of grp, thus to sorted group-names !

Cases of usage : 
1) Identify separator used in concatenated labels, ie concatenated group-names are given, (only argument \code{compNames} is obligatory)

2) Suggets/Find suitable separator for given group-labels (ie a separator not occurring in any of the group-labels) when names 
   of \code{grp} given (thus argument \code{grp} is obligatory), 
   the first instance of \code{potSep} fitting will be chosen
}
\examples{
## Suggest separator
getPWseparator(grp=LETTERS[1:3])
getPWseparator(grp=c("B-C","D","E")) 
getPWseparator(grp=c("B-C","D","E"), includeGrp=TRUE) 

## Identify separator used
getPWseparator(compNames=c("B-C","B-D","C-D")) 
getPWseparator(compNames=c("B-C","B-D","C-D"), includeGrp=TRUE) 
}
\seealso{
\code{\link{indexGroupsFromPW}}, \code{\link{getPWseparator}}, colnames of testing results from \code{\link{moderTestXgrp}}, used by \code{\link{replacePWseparator}}
}
