BiologicalRecordsCentre / sparta

Species Presence/Absence R Trends Analyses
http://biologicalrecordscentre.github.io/sparta/index.html
MIT License
21 stars 24 forks source link

Harmonize how BUGS code is written and read #81

Closed drnickisaac closed 5 years ago

drnickisaac commented 6 years ago

I've been trying to figure out which bits of code are redundant. It's complicated by the fact that sparta has options to both read in BUGS code from text files and assemble them using metacoding.

The current structure makes it really hard to figure out what's going on. As an example, I've been trying to figure out whether mu.lp is still used anywhere in the code. A "find in files" search returns nothing, because mu.lp appears in the BUGS code stored outside the folder with R scripts.

I think it would be worth reviewing best practice. As a first step, I would recommend moving the text files into a set of R functions, then coming up with a plan to minimise the content of each and maximise the use of metacoding.

AugustT commented 5 years ago

links to #69

AugustT commented 5 years ago

links to #60

drnickisaac commented 5 years ago

Model files are read in here: https://github.com/BiologicalRecordsCentre/sparta/blob/b75c934a05078234eff82737d73eb607d0ca8fe7/R/getModelFile.R#L53

New issue #108 unpacks the issue in more detail.