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 1:
# R program to concatenate two strings # Given Strings string1 <- "Geeks"string2 <- "Geeks" # Using paste() method answer <- paste(string1, string2, sep=" For ") print(answer) |
chevron_right
filter_none
Output:
[1] "Geeks For Geeks"
Example 2:
# R program to concatenate two strings # Given Strings string1 <- "I Love"string2 <- "R programming" # Using paste() method answer <- paste(string1, string2, sep=" ") print(answer) |
chevron_right
filter_none
Output:
[1] "I Love R programming"
Recommended Posts:
- Splitting Strings in R programming - strsplit() method
- Check if Elements of a Vector are non-empty Strings in R Programming - nzchar() Function
- Print Strings without Quotes in R Programming - noquote() Function
- Formatting Numbers and Strings in R Programming - format() Function
- Get Exclusive Elements between Two Objects in R Programming - setdiff() Function
- Intersection of Two Objects in R Programming - intersect() Function
- Check if Two Objects are Equal in R Programming - setequal() Function
- Plotting Graphs using Two Dimensional List in R Programming
- Two Dimensional List in R Programming
- Union of two Objects in R Programming - union() Function
- Performing different Operations on Two Arrays in R Programming - outer() Function
- Compute the Covariance between Two Vectors in R Programming - cov() Function
- Compute the Correlation Coefficient Value between Two Vectors in R Programming - cor() Function
- Merge Two Data Frames by common Columns in R Programming - merge() Function
- Add Color Between Two Points of Kernel Density Plot in R Programming - Using with() Function
- Find the Difference Between Two Dates in R Programming - julian() Function
- Two-Proportions Z-Test in R Programming
- Finding the length of string in R programming - nchar() method
- Performing Binomial Test in R programming - binom.test() Method
- Performing F-Test in R programming - var.test() Method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

