Learn R Programming

wrMisc (version 2.0.0)

replacePWseparator: 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
)

Value

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

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

See Also

indexGroupsFromPW, getPWseparator, .getPWseparator

Examples

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

Run the code above in your browser using DataLab