How to collapse a list of characters into a single string in R

You can do it with paste function

    > paste(c('A', 'B', 'C'), collapse=", " )
    [1] "A, B, C"

Leave a Comment