Re: [R] string concatenation operator

2005-02-24 Thread Gabor Grothendieck
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

Re: [R] string concatenation operator

2005-02-24 Thread 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 Thanks, spencer graves Gabor Grothendieck wrote: Harris A. Jaffee hjaffee at jhmi.edu writes: : Why doesn't R have

RE: [R] string concatenation operator

2005-02-24 Thread McGehee, Robert
: 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

RE: [R] string concatenation operator

2005-02-24 Thread Liaw, Andy
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

Re: [R] string concatenation operator

2005-02-24 Thread Spencer Graves
: [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

RE: [R] string concatenation operator

2005-02-24 Thread Henrik Bengtsson
] 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

RE: [R] string concatenation operator

2005-02-24 Thread Prof Brian Ripley
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