In this tutorial, we are going to learn about concatenating two strings in the r programming language.
paste() method takes the two strings as a first argument, second argument, and concatenate it into a single string.
Here is an example:
x <- "hello" y <- "world" paste(x, y)
 "hello world"
You can also concatenate two strings by using a separator like this:
x <- "hello" y <- "world" paste(x, y, sep= "-")
Similarly, you can also use the
stri_paste() function from the
stringi package like this.
name = c('josh', 'king') stri_paste(letters, collapse= "")