-
Notifications
You must be signed in to change notification settings - Fork 35
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
Recursive evaluate #36
Comments
I have never called |
Hi, The problem is due to the recursive evaluate calls: first call by knit() for the R chunk on the parent document (issuing a knit_child), and the second call by the knit child, calling knit then evaluate again. What I humbly suggest would be:
What do you think ? P.S In the meantime I setup a fix that automatically patches evaluate:::set_hooks when in a knit_child. |
Somewhat related: a while back I suggested to Paul Murrell that graphic events should better be implemented as conditions rather than hooks. That way we can use the standard
He seemed open to the idea, but not sure how hard it would be to implement this. |
@kforner That sounds good. Do you mind submitting two pull requests to this repo and the knitr repo, respectively? Thanks! |
Hmm in fact it is more complex that I anticipated, it is difficult to cover all use cases. |
As for the knit_child bug, last commit (ba0efa5) by Yihuie seems to fix the problem. |
Closing, since it's been ~10 years (😱) without further discussion. |
I am experiencing some strange problems with knitr inside opencpu sometimes which I suspect might be a side effect of the recursive use of evaluate (both by knitr and by opencpu). E.g. a toy example:
Which parts of evaluate might be sensitive to recursion problem? I am mostly thinking about the plot hooks, but perhaps other things as well? @yihui, have you ever experienced problems when trying to call
knit
inside evaluate, i.e.evaluate("knit(...)")
?The text was updated successfully, but these errors were encountered: