|
|
|
|
|
by scottmmjackson
3120 days ago
|
|
But if you know R, you can change the behavior of operators. > oldPlus <- `+`
> `+` <- function(e1, e2) {
+ if (is.character(e1) && is.character(e2))
+ paste(e1,e2,sep="")
+ else
+ oldPlus(e1,e2)
+ }
> "hello" + "world"
[1] "helloworld"
|
|