Harris A. Jaffee hjaffee at jhmi.edu writes:
: Why doesn't R have one, like . in Perl or juxtaposition in awk?
You could define one like this:
R %+% - function(x,y) paste(x,y,sep=)
R abc %+% def
[1] abcdef
__
R-help@stat.math.ethz.ch mailing list
Can we do something to make the following work:
+.character - function(x,y) paste(x,y,sep=)
abc+def
Error in abc + def : non-numeric argument to binary operator
Thanks,
spencer graves
Gabor Grothendieck wrote:
Harris A. Jaffee hjaffee at jhmi.edu writes:
: Why doesn't R have
: Spencer Graves [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 24, 2005 3:46 PM
To: Gabor Grothendieck
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] string concatenation operator
Can we do something to make the following work:
+.character - function(x,y) paste(x,y,sep=)
abc+def
I believe not, because:
get(+)
.Primitive(+)
i.e., it's not an S3 generic.
Andy
From: Spencer Graves
Can we do something to make the following work:
+.character - function(x,y) paste(x,y,sep=)
abc+def
Error in abc + def : non-numeric argument to binary operator
: [R] string concatenation operator
Can we do something to make the following work:
+.character - function(x,y) paste(x,y,sep=)
abc+def
Error in abc + def : non-numeric argument to binary operator
Thanks,
spencer graves
Gabor Grothendieck wrote:
Harris A. Jaffee hjaffee
] On Behalf Of Liaw, Andy
Sent: Thursday, February 24, 2005 10:18 PM
To: 'Spencer Graves'
Cc: r-help@stat.math.ethz.ch
Subject: RE: [R] string concatenation operator
I believe not, because:
get(+)
.Primitive(+)
i.e., it's not an S3 generic.
Andy
From: Spencer Graves
Can we
On Fri, 25 Feb 2005, Henrik Bengtsson wrote:
.Primitive() does not necessarily apply non-S3 generic function, cf.
as.character().
You mean `imply'? In fact + *is* S3 generic and has methods defined:
methods(+)
[1] +.Date +.POSIXt
It is also group-generic, part of the Ops group with many more