How can I concatenate (merge, combine) two values? For example I have:
tmp = cbind(\"GAD\", \"AB\")
tmp
# [,1] [,2]
# [1,] \"GAD\" \"AB\"
Another way:
sprintf("%s you can add other static strings here %s",string1,string2)
It sometimes useful than paste()
function. %s
denotes the place where the subjective strings will be included.
Note that this will come in handy as you try to build a path:
sprintf("/%s", paste("this", "is", "a", "path", sep="/"))
output
/this/is/a/path