-
-
Notifications
You must be signed in to change notification settings - Fork 982
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
Question: how to define the scope of inline chunks #1853
Comments
As far as I tried, I faced error with a normal chunk. I'd recommend I guess this is the cause.
|
Thanks @atusy but I don't get you: I am fine with packages attaching envir at the second position and I don't see how this explains why chunks and inline work using different scopes. Would not that be simply a bug? |
@atusy FWIW we are discussing this in the community website if you want to join and share ideas |
The scoping issue does not seem to be reproduced by others, and manipulating environment can easily be avoided by using |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
Dear @yihui and colleagues, this is a rather technical question (see link to RStudio community at the end)
Within a package I am working on, I am creating optional vignettes that the user can build on demand.
I would like the building of such vignettes happens in an environment that does not have the global one as parent.
So, my custom vignette building function includes something like:
The problem, when I do that, is that the package loaded and the objects created inside knitr chunks are not visible (in scope) to inline calls that follow, although they are visible to other chunks.
I don't understand why and how to cope with this scoping issue.
I have posted a question on RStudio community with a full reprex (https://community.rstudio.com/t/scoping-environment-struggle-in-r-markdown/70709), but failed to attract any attention in more than a week.
The text was updated successfully, but these errors were encountered: