[Rd] segments and arrows generic?

Bill.Venables at csiro.au Bill.Venables at csiro.au
Wed Jan 31 02:52:27 CET 2007


Has anyone ever suggested making segments() and arrows() generic (as
indeed they are in another not dissimilar implementation)?

The practical issue with these functions is the need to specify origin
and destination using four separate arguments.  It would be much more
convenient to use only two.  If segments were (S4) generic, for example,
you could write methods for 

signature(x0 = "matrix", y0 = "matrix", x1 = "missing", y1 = "missing")
signature(x0 = "complex", y0 = "complex", x1 = "missing", y1 =
"missing")

With the present function as the default method, no existing working
code would be affected.

Bill Venables



More information about the R-devel mailing list