What is Paste Method in R?

paste() method in R programming is used to concatenate the two string values by separating with delimiters.

Syntax: paste(string1, string2, sep=)
Return: Returns the concatenate string.

Example:

# R program to concatenate two strings
  
# Given Strings
string1 <- "Hello"
string2 <- "Hello"
  
# Using paste() method
answer <- paste(string1, string2, sep=" for ")
  
print(answer)

Output:

[1] "Hello for Hello"