richarddmorey / BayesFactor

BayesFactor R package for Bayesian data analysis with common statistical models.
https://richarddmorey.github.io/BayesFactor/
131 stars 49 forks source link

Using BayesFactor from a different package requires setting many options before it will work #84

Closed jonathon-love closed 7 years ago

jonathon-love commented 7 years ago

hi rich,

a lot of your functions have default arguments like:

options()$BFprogress

an issue with this is that if BFprogress hasn't been set, these functions will fail. these options are set when the user calls library(BayesFactor) (the code for this lives in onAttach.R), but this does not occur when BayesFactor is imported/used by another package.

the solution is to replace these defaults with:

getOption('BFprogress', interactive())

which has the added advantage that the default shows up in the documentation.

cheers

richarddmorey commented 7 years ago

Thanks, I'll do this.