Assuming I have two strings, Olá
and mundo!
, how do I concatenate them using R?
Assuming I have two strings, Olá
and mundo!
, how do I concatenate them using R?
Using the command paste
:
paste("Olá", "mundo!", sep=" ")
[1] "Olá mundo!"
paste("Olá", "mundo!", sep="-")
[1] "Olá-mundo!"
Use the ?paste
command to access the help of the function and learn its other features.