I understand that breaking code is a problem, and that is admittedly the main reason not to immediately adopt my suggestion.
But as a purely logical exercise, creating a "PCA" object X or something similar and using either plot(X) or plot(as.PCA(mySpecialObject)) is a much more sensible use of object-oriented programming/design. This requires no new generics (to write or to learn). And you could use it to transition away from the current system by convincing the various package maintainers to re-implement plotPCA as follows: plotPCA <- function(object, ...) { plot(as.PCA(object), ...) } This would be relatively easy to eventually deprecate and teach users to switch to the alternative. On 10/20/2014 1:07 PM, Michael Love wrote: > hi Kevin, > > that would imply there is only one way to plot an object of a given > class. Additionally, it would break a lot of code. > > best, > > Mike > > On Mon, Oct 20, 2014 at 12:50 PM, Kevin Coombes > <kevin.r.coom...@gmail.com <mailto:kevin.r.coom...@gmail.com>> wrote: > > But shouldn't they all really just be named "plot" for the > appropriate objects? In which case, there would already be a > perfectly good generic.... > > On Oct 20, 2014 10:27 AM, "Michael Love" > <michaelisaiahl...@gmail.com <mailto:michaelisaiahl...@gmail.com>> > wrote: > > I noticed that 'plotPCA' functions are defined in EDASeq, > DESeq2, DESeq, > affycoretools, Rcade, facopy, CopyNumber450k, netresponse, > MAIT (maybe > more). > > Sounds like a case for BiocGenerics. > > best, > > Mike > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioc-devel@r-project.org <mailto:Bioc-devel@r-project.org> > mailing list > https://stat.ethz.ch/mailman/listinfo/bioc-devel > > --- This email is free from viruses and malware because avast! Antivirus protection is active. [[alternative HTML version deleted]] _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel