install a CRAN package that imports a CRAN package that imports a Bioconductor package

I have a CRAN package say myPack, that imports two CRAN packages, say cranA and cranB. These two packages import Bioconductor packages, say biocA and biocB. When I try installation of my package with install.packages("myPack") this ends up with error. I have to install biocA and biocB that are imported from both cranA and cranB in order to successfully install "myPack".

Does anyone have any idea how to do in order to successfully install myPack without having to install beforehand biocA and biocB from Bioconductor?

P.S. I have seen answers if you add biocViews to the DESCRIPTION file of myPack, but I think this is not sufficient for successful installation with install.packages(). The installation is successful if in addition you set the repositories with setRepositories() and you choose "CRAN" and "BioC software" and then you use install.packages() where the package inside install.packages() contains biocViews to the DESCRIPTION file. So it seems that biocViews to the DESCRIPTION file does not automatically connect to Bioconductor repository.

• I suggest you post this over at [support.bioconductor.org](support.bioconductor.org).
– user3051
Jan 1, 2022 at 19:09
• From my experience there is no good solutions. Many packages I use offer step-to-step guidance about installing CRAN and bioconductor packages separately in a certain order. Jan 3, 2022 at 0:52