RE: [R] How to check the code for generic function in a specific package?

From: F Duan <f.duan_at_yale.edu>
Date: Wed 07 Jul 2004 - 02:52:56 EST


Thanks for your answer. My problem is:

For example, I want to check the code for function "boxplot" and do some modifications in a specific package, but "boxplot" has also been defined in another package (e.g., graphics). Therefore, when I type "boxplot" or "fix(boxplot)" at the R prompt, I only get a message like:

> boxplot

 standardGeneric for "boxplot" defined from package "graphics"

 function (x, ...)
 standardGeneric("boxplot")
 <environment: 02D4FC14>
 Methods may be defined for arguments: x

There is no source code pop-up, either for the package "graphics" or the package I am working with.

Frank Duan

-----Original Message-----
From: Uwe Ligges [mailto:ligges@statistik.uni-dortmund.de] Sent: Monday, July 05, 2004 17:58
To: F Duan
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] How to check the code for generic function in a specific package?

F Duan wrote:

> Hello, R people,
>
>
>
> I am a R beginner. I searched the R-FAQ and R-help and failed to find the
> answers.
>
>
>
> Could anyone tell me how to check (or edit) a generic function within a
> specific package? If the function is not generic, I can just type the
> function name at the R prompt or use "fix()" and "edit()".

fix() *does* work for me, giving you expect that the fucntion is not "fixed" within the package, but a new (changed) instance is created in your Workspace.....

What do you expect to happen? What is the error message (if there is any)?

In order to change packages, you might want to edit the package sources directly.

Uwe Ligges

>
>
> Thanks a lot.
>
>
>
> Frank
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jul 07 02:58:36 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 09:45:37 EST