listGroupsByNames: Organize values into list and sort by names

View source: R/listGroupsByNames.R

listGroupsByNamesR Documentation

Organize values into list and sort by names

Description

Sort values of 'x' by its names and organize as list by common names, the names until 'sep' are used for (re)grouping. Note that typical spearators occuring the initial names may need protection by '\' (this is automatically taken care of for the case of the dot ('.') separator).

Usage

listGroupsByNames(x, sep = ".", silent = FALSE, debug = FALSE, callFrom = NULL)

Arguments

x

(list) main input

sep

(character) separator (note that typcal separators may need to be protected, only automatically added for '.')

silent

(logical) suppress messages

debug

(logical) additional messages for debugging

callFrom

(character) allow easier tracking of messages produced

Value

matrix or data.frame

See Also

rbind in cbind

Examples

listGroupsByNames((1:10)/5)
ser1 <- 1:6; names(ser1) <- c("AA","BB","AA.1","CC","AA.b","BB.e")
listGroupsByNames(ser1)

wrMisc documentation built on Nov. 17, 2023, 5:09 p.m.