Comments (5)
Thanks for filing such a carefully researched issue. We really appreciate it.
Is the book not building from the shell scripts?
The code you're looking for defining the one-draw function is in src/bayes-stats-stan/before-chapter.R
. This is how bookdown suggests code used in every chapter should be organized---as an include. I find the bookown config very confusing in the way it is spread over (at least) three locations, _bookdown.yml
, _output.yml
, and index.Rmd
. The specification to use before-chapter.R
is in our _bookdown.yml
, which contains the line
before_chapter_script: "before-chapter.R"
The reason the code in before-chapter.R
shows up elsewhere stems from the awkward implementation of bookdown, which rather than just running before-chapter.R
, actually pastes it into the front of each .Rmd
file. This means each such file is touched for each build; it tries to erase it at the end, but if you stop the build in the middle, it lingers rather than getting properly cleaned up. Then you can get multiple before-chapter includes, so we have to keep cleaning them. We've been fighting against this unfortunate behavior. I filed an issue against bookdown, and they're aware of it, but they are not going to fix it as far as I know.
We're happy to entertain suggestions for how to better organize this without having to manually cut-and-paste code into the front of each chapter.
Just as a heads up, we're going to remove all of the displayed R from the bookdown, because this book isn't meant to be about R, it's meant to be about Stan. The current state arose from @andrewgelman adding new material in R to the front of our user's guide (one of the new R-heavy chapters is from @jgabry's teaching material). This needs to be cleaned up. When there's no R at all in the text, will it be less confusing about where code is?
from docs.
I wasn't trying to build the book but simply found it when looking for documentation and started reading. I have no experience with bookdown so I don't have any suggestions there. My simple point was, that the online HTML version on mc-stan.org doesn't include the code and the extract_one_draw
-function in before-chapter.R
and therefore makes the example non-reproducible unless the reader cross-references the source .Rmd
documents here on GitHub.
R certainly makes it easier for the uninitiated user like me to get started, but the resources for that are available elsewhere (e.g. the fantastic book by Richard McElreath) and hello-world examples like this would certainly also be clear and instructive without it.
But the future goal of removing the R-code altogether renders this issue pointless, which I realize is still in the wrong repository... Thank you for taking the time to answer me. I'm looking forward to delving deeper into Stan and the book looks like a fantastic resource for this.
from docs.
Thanks for clarifying. I see how having some R but not all of it in the .html output is confusing. Hopefully after I clean this up, it'll be clear that it's just pseudocode explaining what's going on at a high level. In that way, it'll be more like the BUGS Book than like our case studies.
P.S. This is the right repository. We're going to put all the high-level doc for the language here. The interfaces have their own documentation---RStan has a lot of nice vignettes, for example.
from docs.
The R code seemed really useful to me, It'll be basically useless to me without it. Although I also wondered where the extract_one_draw() function was.
from docs.
Thanks for the feedback. I think we're going to wind up pulling these first few R tutorial chapters on workflow out into their own book. They have two problems as is: they're not finished/edited up to our manual standards, and they use R, when this is meant to be interface neutral.
from docs.
Related Issues (20)
- update issue templates HOT 2
- consistent naming of covariance/correlation matrices
- add Survival models chapter to Stan User's Guide TOC
- Stan User's Guide Efficiency Tuning Section - beta_binomial? HOT 1
- add links to pdfs from docs homepage and overview pages
- add dark mode for website
- Problem searching the functions reference HOT 3
- Incorrect equation for wiener pdf
- [User Guide] Stan Translation efforts HOT 3
- Add more in-depth description of Pathfinder to the reference-manual
- Functions Refernce: return type of `bernoulli_rng` - `R` or `ints`? HOT 1
- Functions Reference - Array reductions contain vector-only signatures HOT 2
- needs updating: Efficiency-tuning/standardizing-predictors-and-outputs HOT 6
- Update documentation for "Missing Data: Sliced missing" data to new array syntax HOT 1
- Incorrect equation in the truncated data section HOT 1
- replace "sampling statement" with "target augmentation statement" HOT 2
- document normal sufficient stats in User's Guide efficiency chapter HOT 1
- Document that non-data variables are not allowed in top level size declarations - consequences for `generated quantities` block HOT 6
- Document new overloads of `wiener_lpdf`
- question - mismatch between SUG chapters
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.