cPasteS: paste a list into a delimited vector using sorted values

cPasteSR Documentation

paste a list into a delimited vector using sorted values

Description

Paste a list of vectors into a character vector, with values sorted then delimited by default with a comma.

Usage

cPasteS(
  x,
  sep = ",",
  doSort = TRUE,
  makeUnique = FALSE,
  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(.., doSort=TRUE).

See Also

Other jam string functions: asSize(), breaksByVector(), cPasteSU(), cPasteUnique(), 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(), cPasteUnique(), cPasteU(), cPaste(), heads(), jam_rapply(), list2df(), mergeAllXY(), mixedSorts(), rbindList(), relist_named(), rlengths(), sclass(), sdim(), uniques(), unnestList()


jmw86069/jamba documentation built on Oct. 9, 2024, 10:52 a.m.