I'm developing a package. How can I specify a dependent package to be installed with an option?
1
0
Entering edit mode
@arman-shahrisa-7713
Last seen 6.1 years ago

I'm developing a package. How can I specify a dependent package to be installed with an option?

For example, inside description file:

Depends: cgdsr, xlsx, gplots, RColorBrewer, rafalib, Biobase, genefilter, xlsxjars

I manually install the "xlsxjars" package as "install.packages("xlsxjars", INSTALL_opts = "--no-multiarch")". How can I make it be automatically installed this way but as a dependency for another package?

 

 

package dependency • 1.3k views
ADD COMMENT
1
Entering edit mode
@herve-pages-1542
Last seen 10 hours ago
Seattle, WA, United States

Hi,

Note that questions about package development should be asked on the bioc-devel mailing list.

Not sure why you'd want to take control over the installation options of a dependent package. Doesn't sound like a good idea to me. Note that these options are only relevant when installing from source. The --no-multiarch option in particular is only relevant when installing from source on Windows or Mac. However most people (and the Bioconductor build system) install the CRAN binary packages on these platforms. Last but not least, AFAICT xlsxjars doesn't contain any C, C++, or Fortran code, only jar files, so I wonder how installing it from source with the --no-multiarch option would make any difference.

Cheers,

H.

ADD COMMENT
0
Entering edit mode

Hi,

My package requires "xlsx" package to export data as excel files. Even with java runtime environment installed, R returns an error during the installation of "xlsx" package. I googled it and found "install.packages("xlsxjars", INSTALL_opts = "--no-multiarch")" in a forum. It fixed the problem for me. In Linux, specific package rjava should be installed. Otherwise, installation of "xlsx" will end with an error.

So, there is nothing I can do?

ADD REPLY
1
Entering edit mode

The xlsxjars Windows and Mac binaries provided on CRAN should work. If they don't, then that's probably something that you'd want to discuss with the xlsxjars maintainers and/or the CRAN folks. It's good that you found a workaround that fixes the problem for you but that doesn't really address the issue. You can't control how depending packages get installed. How could you? Depending packages could already be installed on the user machine before the user tries to install your package. So all you can and should do is assume that depending packages are already installed and working properly on the user's machine. How they got installed is not your business as far as development of your own package is concerned.

Hope that makes sense,

H.

ADD REPLY

Login before adding your answer.

Traffic: 422 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6