Open perrydv opened 3 weeks ago
@perrydv I'm not quite following. If we did try to deregister first automatically presumably we'd want deregisterDistributions
to be given a flag to tell it to check to see if the distribution is registered, and if not, to simply return with no action. Then the warning business wouldn't be necessary. I think I'm not seeing something.
@paciorek Are we thinking of different flavors of the same idea? I was suggesting that one wants to be able to call deregisterDistributions
and not be warned if the distribution wasn't registered anyway. This idea is similar to e.g. the showWarnings
argument of dir.create
. You are describing an an argument indicating that the call should return with no action if the distribution registered. So in other words you are describing an argument for the user to say they don't want a warning or error. Same thing?
In looking at user workflow(s), it seems easier sometimes to have
deregisterDistributions
always called beforeregisterDistributions
. That way, if one is coding/debugging, the deregistration will always be done if it's needed. However, the first time through, or if called repeatedly before a fresh call toregisterDistributions
, it will give a warning that the distribution was not registered. I think it would be nice to offer an argumentwarn
that defaults toTRUE
but ifFALSE
will not emit the warning.