To concatenate two strings in R, you can use the `paste()` function.
In this example,
str1
and str2
with values "Hello"
and "World"
respectively.str1
and str2
using the `paste()` function and store the result in a variable named result
.result
to the console.str1 <- 'Hello'
str2 <- 'World'
result <- paste(str1, str2)
cat(result)
Hello World
In this tutorial, we learned How to Concatenate Two Strings in R language with well detailed examples.