-
Notifications
You must be signed in to change notification settings - Fork 301
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
Notes are silently dropped if a no-output producing chunk is inserted #447
Comments
Thanks for asking @thothal!
Rather than call this a workaround, I'd say it's the solution. In flexdashboard, chunks are automatically repurposed in certain ways. If you want to run code without affecting the appearance of the dashboard, then you need to use |
Thanks for the feedback. A fair point, but I guess it deserves to be explicitely mentioned in some of the docs then, b/c it took me by surprise and quite some debugging sessions to even find out when the notes disappear. I like to split up code, and not all chunks produce an output. I was totally not aware that you must not include non output chunks, b/c besides the issue with the notes I did not see any issue with that up to now. My take away is to not include these non output chunks in the future, and recommend to document that somewhere, such that others don't fall in the same trap. |
Great point! Do you remember where you looked while debugging? It's hard to know where to put these kinds of things in the docs. |
Well, I did read the documentation at https://pkgs.rstudio.com/flexdashboard/articles/using.html quite thoroughly and any section title Non output producing chunks would have caught my attention 😉 So I guess any hint there would be useful, because unlike for 'normal' packages where I read the builtin help pages, I usually refer exclusively to the published articles for |
Disclaimer
I previously asked this question on SO to check whether this behavior is maybe intentional and got a workaround as a solution, but I am still not sure whether this behavior is really intentional.
Problem
When adding a chunk, which produces no output (for example to close a database connection), after a chunk with notes, the notes ( added via
>
) disappear.Reprex
The text is by the way in the final HTML but not rendered properly:
Workaround is to add
include = FALSE
toclean-up-chunk
.Session Info
The text was updated successfully, but these errors were encountered: