paste: Concatenates Two Strings Without Any Separator

Description Usage Arguments Details Value Author(s) See Also Examples

Description

%c% is just a short operator implementation for paste(x, y, separator="").

Usage

1
x %c% y

Arguments

x

first string

y

second string, which will be pasted behind the first one.

Details

R-Core does not consider it a good idea to use + as an operator not being commutative. So we use c here.
See the discussion: https://stat.ethz.ch/pipermail/r-devel/2006-August/039013.html
and http://stackoverflow.com/questions/1319698/why-doesnt-operate-on-characters-in-r?lq=1

Still the paste syntax seems sometimes clumsy in daily life and so %c% might spare some keys.

Value

returns the concatenation as string.

Author(s)

Andri Signorell <andri@signorell.net>

See Also

Between, %like%

Examples

1
2
3
4
"foo" %c% "bar"

# works with numerics as well
345 %c% 457


Search within the DescTools package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.