How can two strings be concatenated?

前端 未结 12 1916
时光说笑
时光说笑 2020-11-22 16:14

How can I concatenate (merge, combine) two values? For example I have:

tmp = cbind(\"GAD\", \"AB\")
tmp
#      [,1]  [,2]
# [1,] \"GAD\" \"AB\"
12条回答
  •  感动是毒
    2020-11-22 16:38

    Given the matrix, tmp, that you created:

    paste(tmp[1,], collapse = ",")
    

    I assume there is some reason why you're creating a matrix using cbind, as opposed to simply:

    tmp <- "GAD,AB"
    

提交回复
热议问题