Last data update: 2014.03.03
|
R: Concatenates the elements of a vector (optionaly enclosing...
Concatenates the elements of a vector (optionaly enclosing them in
quotation marks or parentheses) adding appropriate punctuation and
unions.
Description
A vector x becomes "x[1] ", "x[1] and
x[2] ", or "x[1] ,
x[2] , and x[3] ", depending on the langth of x .
Usage
paste.and(x, oq = "", cq = "")
Arguments
x |
A vector.
|
oq |
Opening quotation symbol. (Defaults to none.)
|
cq |
Closing quotation symbol. (Defaults to none.)
|
Value
A string with the output.
See Also
paste, cat
Examples
print(paste.and(c()))
print(paste.and(1))
print(paste.and(1:2))
print(paste.and(1:3))
print(paste.and(1:4))
Results
|