Open gdbassett opened 5 years ago
Makes sense re: the stan code.
I'm not sure what you mean by making the imports visible. All of the imported libraries in the example are listed in the first code chunk under Examples, do you mean using the ::
syntax to more explicitly name packages in the code itself?
Your interpretation of the last point is correct. I tend to try and reproduce code with as few imports as possible, so I find using ::
to explicitly name packages very helpful. I apologize for not explaining it better.
Ah, I kind of like to go to the other extreme: I like having all the imports in one chunk at the top so I can look at one place to know exactly what libraries are necessary to build the entire document.
I don't anticipate going all the way to the other extreme (I find lots of explicit use of ::
less fluent to read) but I could add it in to some places for functions only used once or twice. That, or I might try to be more consistent about listing packages needed for particular functions before relevant code chunks.
I completely understand on cataloging the used libraries. The targeted usage would be perfect for me as I recognize the most common verbs, but do little modeling and am just starting too try and work in a consistent bayesian toolchain so don't recognize many of the associate functions.
Ah makes sense. Next time I do a pass on the vignettes I'll try to add references when packages outside of the core set of typical rstan+tidyverse packages are used.
(splitting the function reference part into #204 so this issue can just be about stan code chunks).
In the current README.Rmd, some stan code is executed directly and so is not clear from a replication standpoint in the README.md
Under the stan model, may I suggest adding that it can be stored as a string in (ABC_stancode) and then that something like
ABC_stan <- rstan::stan_model(model_code = ABC_stancode)
or such. That way those hoping to run thesampling()
lines are aware of how to produce the stan model.Also, making the imports visible would help (me at least) as I don't inherently know all of the functions so have to hunt for them if the imports aren't shown.