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

后端 未结 3 929
天涯浪人
天涯浪人 2020-12-06 08:59

There is a list which I would like to output into an excel file as a single string. I start with a list of characters.

  url=\"http://eutils.ncbi.nlm.nih.gov         


        
3条回答
  •  感动是毒
    2020-12-06 09:27

    You can do it with paste function

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

提交回复
热议问题