Learn R Programming

pvar (version 1.0.9)

ConcatenateStrings: Concatenate strings

Description

Concatenate Strings

Usage

x %.% y

Arguments

x, y
strings that should be concatenated.

Value

  • A character string of the concatenated values.

Details

The same result may be achieved with paste, but in some circumstance this function is more user friendly.

See Also

paste

Examples

Run this code
paste("I ", "love ", "R.", sep="")
"I " %.% "love " %.% "R."

x = c(2,1,6,7,9)
paste("The length of vector (", paste(x , sep="", collapse =","), ") is ", length(x) , sep="")
"The length of vector (" %.% paste(x , sep="", collapse =",") %.% ") is " %.% length(x)

Run the code above in your browser using DataLab