Best way to implement optional functions?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Best way to implement optional functions?

J C Nash
I'm relieved to read that this issue is becoming more visible. In my own
work on optimizers, I've been finding it awkward to provide a clean
solution to allowing users to run e.g., optimx, when some optimizers are
not installed. Unfortunately, I've not found what I consider to be a
solution with any elegance.

JN

On 15-10-23 06:00 AM, [hidden email] wrote:

> Message: 8
> Date: Thu, 22 Oct 2015 15:55:01 -0400
> From: Duncan Murdoch <[hidden email]>
> To: "[hidden email]" <[hidden email]>
> Subject: [Rd] Best way to implement optional functions?
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> I'm planning on adding some new WebGL functionality to the rgl package,
> but it will pull in a very large number of dependencies. Since many
> people won't need it, I'd like to make the new parts optional.
>
> The general idea I'm thinking of is to put the new stuff into a separate
> package, and have rgl "Suggest" it.  But I'm not sure whether these
> functions  should only be available in the new package (so users would
> have to attach it to use them), or whether they should be in rgl, but
> fail if the new package is not available for loading.
>
> Can people suggest other packages that solve this kind of problem in a
> good way?
>
> Duncan Murdoch

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel