[R-pkg-devel] Suggesting gurobi

Noah Greifer no@h@gre||er @end|ng |rom gm@||@com
Fri Jun 4 21:35:53 CEST 2021


I have been working on adding an option for my users to use integer
programming (a method of optimization) to enhance the results of a function
in my package. There are several R packages on CRAN that perform integer
programming, including Rglpk and Rsymphony. However, there is a commercial
solver called Gurobi that dramatically outperforms all open-source solvers,
and it comes with an R interface through the gurobi package. I want to
allow my users to use Gurobi to perform the package actions.

A potential issue is that the gurobi package is not on CRAN; it comes with
an installation of the Gurobi software, which requires a license. I am not
sure how to add gurobi to my Description file to satisfy CRAN's
requirements. In CMD CHECK, I get the warning that the package is not
available for checking. However, I have noticed some other packages do use
gurobi just as I want to (i.e., as an option), such as CVXR
<https://cran.r-project.org/package=CVXR> and designmatch
<https://cran.r-project.org/package=designmatch>, which put gurobi in
Enhances (though I would have thought it would belong in Suggests). It
seems that neither of these packages passes the CRAN checks, though.

I'm wondering what the best practices are for including gurobi in my
package. To be clear, its use is optional and the package can be functional
without it, but it greatly enhances performance so I want my users to be
able to use it. Thank you!

Noah Greifer

	[[alternative HTML version deleted]]

More information about the R-package-devel mailing list