To concatenate two characters in a print() statement in R, you can use the paste()
or paste0()
function. Here is an example:
main.r237 chars9 lines
Alternatively, you can also use the concatenation operator %+%
:
main.r44 chars3 lines
Note that the cat()
function can also be used to print concatenated strings without any separation or newline characters.
gistlibby LogSnag