cPasteUnique: paste a list into a delimited vector using unique values

cPasteUniqueR Documentation

paste a list into a delimited vector using unique values

Description

Paste a list of vectors into a character vector of unique values, usually delimited by a comma.

Usage

cPasteUnique(
  x,
  sep = ",",
  doSort = FALSE,
  makeUnique = TRUE,
  na.rm = FALSE,
  keepFactors = FALSE,
  checkClass = TRUE,
  useBioc = TRUE,
  ...
)

Arguments

x

input list of vectors

sep

character delimiter used to paste multiple values together

doSort

logical indicating whether to sort each vector using mixedOrder().

makeUnique

logical indicating whether to make each vector in the input list unique before pasting its values together.

na.rm

boolean indicating whether to remove NA values from each vector in the input list. When na.rm is TRUE and a list element contains only NA values, the resulting string will be "".

keepFactors

logical only used when useLegacy=TRUE and doSort=TRUE; indicating whether to preserve factors, keeping factor level order. When keepFactors=TRUE, if any list element is a factor, all elements are converted to factors. Note that this step combines overall factor levels, and non-factors will be ordered using base::order() instead of jamba::mixedOrder() (for now.)

useBioc

logical indicating whether this function should try to use S4Vectors::unstrsplit() when the Bioconductor package S4Vectors is installed, otherwise it will use a less efficient mapply() operation.

...

additional arguments are passed to mixedOrder() when doSort=TRUE.

Details

This function is convenient a wrapper for cPaste(.., makeUnique=TRUE).

See Also

Other jam string functions: asSize(), breaksByVector(), cPasteSU(), cPasteS(), cPasteU(), cPaste(), fillBlanks(), formatInt(), gsubOrdered(), gsubs(), makeNames(), mixedOrder(), mixedSortDF(), mixedSorts(), mixedSort(), mmixedOrder(), nameVectorN(), nameVector(), padInteger(), padString(), pasteByRowOrdered(), pasteByRow(), sizeAsNum(), tcount(), ucfirst(), uniques()

Other jam list functions: cPasteSU(), cPasteS(), cPasteU(), cPaste(), heads(), jam_rapply(), list2df(), mergeAllXY(), mixedSorts(), rbindList(), relist_named(), rlengths(), sclass(), sdim(), uniques(), unnestList()


jmw86069/jamba documentation built on March 26, 2024, 5:26 a.m.