listToCharacterVector {annotationTools}R Documentation

Turn list into character vector

Description

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

Usage

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

##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=', ')

[Package annotationTools version 1.67.0 Index]