[BioC] request
Steve Lianoglou
lianoglou.steve at gene.com
Tue Aug 6 21:53:30 CEST 2013
Hi,
On Tue, Aug 6, 2013 at 12:49 PM, Wolfgang Huber <whuber at embl.de> wrote:
> Dear Laurent
> in pRoloc::plot2D the plot is a side effect (via graphics::plot), and therefore you are free to return something else; while in the function discussed below the plot (a 'trellis' object) is the return value, which then usually is rendered via 'print.trellis'.
>
> (One could stick additional information like the PCA loadings and eigenvalues into the same (S3-)object, initially I thought this was ugly but maybe it's the way to go.)
Along these lines: is it considered "bad form" to just add a "pca"
`attr`-ibute to the xyplot object you are returning? eg:
plotPCA <- function(...) {
## ...
out <- xyplot(PC2 ~ PC1, ...)
attr(out, 'pca') <- pca
invisible(out) ## or not invisible
}
--
Steve Lianoglou
Computational Biologist
Bioinformatics and Computational Biology
Genentech
More information about the Bioconductor
mailing list