replacePWseparator: Replace Separator In Vector Of Pairwise Group-Names This...

View source: R/indexGroupsFromPW.R

replacePWseparatorR Documentation

Replace Separator In Vector Of Pairwise Group-Names This function allows identifying and substituting a separator used in a character vector concatenated of pairwise groups.

Description

Replace Separator In Vector Of Pairwise Group-Names

This function allows identifying and substituting a separator used in a character vector concatenated of pairwise groups.

Usage

replacePWseparator(
  compNames,
  newSep,
  potSep = c("-", "---", "_", "___", ".", "-vs-", "_vs_", "--vs--", "__vs__", " ", "  "),
  silent = FALSE,
  debug = FALSE,
  callFrom = NULL
)

Arguments

compNames

(character or integer) names of pairwise combined group-names

newSep

(character of length=1) new separator between group-names for pair of names; if NULL a suitable separator (among '-','–','_','__','.',' ' and ' ') will be used

potSep

(character) potential separators to be checked if occuring in useComp; the first fitting will used

silent

(logical) suppress messages

debug

(logical) additional messages for debugging

callFrom

(character) allow easier tracking of messages produced

Value

This function returns a character vector with group-wise substituted separators (or NULL if conflicts appear)

See Also

indexGroupsFromPW, getPWseparator, .getPWseparator

Examples

replacePWseparator(compNames=c("B-C","B-D","C-D"), newSep="-vs-") 

wrMisc documentation built on March 9, 2026, 5:07 p.m.