Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README update to make replication more clear #201

Open
gdbassett opened this issue Sep 5, 2019 · 6 comments
Open

README update to make replication more clear #201

gdbassett opened this issue Sep 5, 2019 · 6 comments

Comments

@gdbassett
Copy link

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 the sampling() 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.

@mjskay
Copy link
Owner

mjskay commented Sep 26, 2019

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?

@gdbassett
Copy link
Author

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.

@mjskay
Copy link
Owner

mjskay commented Sep 27, 2019

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.

@gdbassett
Copy link
Author

gdbassett commented Sep 27, 2019

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.

@mjskay
Copy link
Owner

mjskay commented Sep 28, 2019

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.

@mjskay
Copy link
Owner

mjskay commented Sep 28, 2019

(splitting the function reference part into #204 so this issue can just be about stan code chunks).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants