[R] Over-writing functions from other packages? What is a good strategy??
Søren Højsgaard
Soren.Hojsgaard at agrsci.dk
Tue Mar 20 23:25:22 CET 2007
I am writing a package which uses the Rgraphviz package which in turn uses the graph package, but my question does not (I believe) pertain specifically to the these packages so therefore I dare to post the question here:
I my package I have a function "edges" which works on some graphs I have defined. However, there is also a function "edges" (or rather a generic method) in the graph package (seemingly written in S4). When I load my package the Rgraphviz package is automatically loaded, but this means that the edges method of the the graph package "overrides" the edge function in my package.
Is there a way of avoiding this? If there is, I guess that it is a dangerous path to take? But if so, what else is a good strategy to take?
Regards
Søren
More information about the R-help
mailing list