R: develop R Package with bioconductor dependency (earlier solutions fail)

Viewed 87

I'm developing an R package to put on cran and for one of the help pages/in the example section, there is need to load a Bioconductor data set. As found here, the trick for automated installation of Bioconductor packages was to add biocViews: to the DESCRIPTION file, which does not work anymore.

Instead,

\examples{
\dontrun{

if (requireNamespace("GEOquery","Biobase")) {
myGEO <- GEOquery::getGEO("GDS3143")
eset <- GEOquery::GDS2eSet(myGEO)
xpr <- na.omit(data.frame(Biobase::exprs(eset)))

dose <- c(rep(0,10),rep(0.5,4),rep(1,8),rep(5,4),rep(10,9),rep(30,5),rep(50,4))
plot(dose, xpr[78,], col=as.factor(dose), lwd=2, ylab ="expression")
}

}}

"works", but is obviously not the appropriate way to proceed. (the :: is used to prevent the Bioconductor packages masking existing R functions)

Is there another way to automatically install Bioconductor packages upon (my) package installation? (some modification of DESCRIPTION file & NAMESPACE?)

0 Answers
Related