[Rd] Packaging and Optional BioC Capabilities

Paul Roebuck roebuck at odin.mdacc.tmc.edu
Mon Jul 11 19:35:24 CEST 2005


I am currently involved with a package that has certain
raw capabilities that enable it to be used without external
package dependencies. However, there are certain
Bioconductor packages containing classes from which I can
extract data to pass along to my current code.

Since my code is not really dependent on these external
packages but merely augmented by their presence, how best
is that relationship "packaged"?

1) Build second package dependent on external packages
that imports original methods and adds additional methods
to S4 generic functions for those BioC classes.

2) Keep single package with external packages suggested
and conditionally add additional methods to S4 generic
functions based on the presence of BioC packages.

If the latter approach is acceptable, something like this
perhaps?

biocpkg <- "whatever"
if (!inherits(try(library(biocpkg), silent = TRUE),
              'try-error')) {
    # SetMethod call using class from Bioconductor
}


----------------------------------------------------------
SIGSIG -- signature too long (core dumped)



More information about the R-devel mailing list