Re: [Rd] Define S4 methods for 'plot'

2011-11-10 Thread cgenolin
I works, thank you very much. -- View this message in context: http://r.789695.n4.nabble.com/Define-S4-methods-for-plot-tp4020750p4023508.html Sent from the R devel mailing list archive at Nabble.com. __ R-devel@r-project.org mailing list

[Rd] Define S4 methods for 'plot'

2011-11-09 Thread cgenolin
Hi the list I am creating a package and I have a problem to define a S4 method for plot. I define a class 'A' and a class 'B'. I want to define a function plot for signature c(A,missing) and another method plot for signature c(A,B). My code is the following : In /package/R/ directory: --- main.R

Re: [Rd] Define S4 methods for 'plot'

2011-11-09 Thread Kevin R. Coombes
You probably need the directive importFrom(graphics, plot) in your NAMESPACE file. This lets the system know that you are using the same plot function that it already knows about. And your code should be careful not to trash a previous conversion of plot to an S4 generic function, usually