listToCharacterVector: Turn list into character vector

Description Usage Arguments Details Value Author(s) References Examples

View source: R/listToCharacterVector.R

Description

Takes a list and returns a character vector by (separately) concatenating the vectors in the list.

Usage

1
listToCharacterVector(lst,sep=' /// ')

Arguments

lst

list object

sep

character string specifying the separator to concatenate each elements of vectors in the list

Details

The output vector has same length as the input list.

Value

v

vector of length 'length(lst)' where the 'i'-th element contains the concatenation of the 'i'-th element of 'lst'.

Author(s)

Alexandre Kuhn

References

Kuhn et al. Cross-species and cross-platform gene expression studies with the Bioconductor-compliant R package 'annotationTools'. BMC Bioinformatics, 9:26 (2008)

Examples

1
2
3
4
5
6
7
##an example list
lst<-vector('list',3)
lst[[1]]<-c('a1','a2')
lst[[2]]<-'b'
lst[[3]]<-c('c1','c2','c3')
##merge first 2 list elements
listToCharacterVector(lst,sep=', ')

annotationTools documentation built on Nov. 8, 2020, 6:58 p.m.