Closed drnickisaac closed 4 years ago
I never intended the users to be able to read the BUGS code. Perhaps we could simply add a vignette which shows the code? Viewing it in the console is probably never going to be satisfactory.
In the meantime
cat(readLines(BRCindicators:::bma_model_smooth_det2()), sep = '\n')
I'm yet to be convinced this is something users need. In fact this function no longer exists...
I'm working on this now. My inclination is to disaggregate bma_BUGS_models.R
into multiple separate scripts with one function per script. Any reason why this is a bad idea?
Done (locally) with new function get_bmaBUGScode
Steve Freeman and I have been trying to get the BUGS code out of this package and found it very frustratingly difficult. I've added an export statement at the top of bma_BUGS_models.R, but even then we found it difficult. Currently there are two options:
BRCindicators:::bma_model_smooth_det2
which returns an unreadable mess, orBRCindicators:::bma_model_smooth_det2()
which returns a file string that I have to modify by hand in order to use. This is quite a bad advertisment for collaborative coding. Please write a wrapper function makes this easy to use.