Re: [R-pkg-devel] conditional import of a package?

2024-12-04 Thread Duncan Murdoch
On 2024-12-04 1:25 p.m., Adelchi Azzalini wrote: Hi. I am working on the development of an existing package (smof, on CRAN). My current aim is widen the list of possible optimizers from which the user can select one method for optimizing a certain task. Well-known possibilities within the base

Re: [R-pkg-devel] conditional import of a package?

2024-12-04 Thread Brian G. Peterson
Adelchi, The package 'PortfolioAnalytics', which we maintain, uses this pattern extensively to support different optimization solvers.  The packages are all in 'Suggests' rather than 'Imports', because we don't want them all required all the time. So the code pattern is something like this: if(o

[R-pkg-devel] conditional import of a package?

2024-12-04 Thread Adelchi Azzalini
Hi. I am working on the development of an existing package (smof, on CRAN). My current aim is widen the list of possible optimizers from which the user can select one method for optimizing a certain task. Well-known possibilities within the base package are optim (with various options) and nlmin