resampling-stats / resampling-with

Source repository for third edition of "Resampling: The New Statistics"
https://resampling-stats.github.io
Other
11 stars 9 forks source link

Simplify logic of option defaults #120

Closed matthew-brett closed 1 year ago

matthew-brett commented 1 year ago

Follow suggestion at original StackOverflow thread, and just check for not-logical prior values, to see if default has been changed. I think that the values will be NULL if not set, but this just checks if they are TRUE or FALSE, to check if they are set.

matthew-brett commented 1 year ago

Thanks. How about now?

matthew-brett commented 1 year ago

Testing - setting the default to NULL does not trigger these routines, and not setting option defaults, and leaving the check as is.logical, also seems to fail - so let's leave as is, with the default of NA and the explicit check for NA.