[Rd] Can I write methods for ":"?

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Nov 10 22:41:50 CET 2004


On Wed, 10 Nov 2004 jhallman at frb.gov wrote:

> Is there a way to overload the ":" operator?  I have a class called
> "ti", but I found that 
> 
> firstTi:secondTi
> 
> does not dispatch to either Ops.ti nor to ":.ti" if I define that.  Am I
> just out of luck?

Well, it is not in the Ops group, so what made you think it would work?

If you mean S3 methods, then ":" is not an S3 generic.  If it were, it 
would be documented.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list