[R] Over-writing functions from other packages? What is a good strategy??

Gabor Grothendieck ggrothendieck at gmail.com
Wed Mar 21 02:59:37 CET 2007


Could you call yours Edges?

On 3/20/07, Søren Højsgaard <Soren.Hojsgaard at agrsci.dk> wrote:
> 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
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list