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

"unfinished" layout does not produce the figure when the last line of the chunk is a comment #600

Closed
knokknok opened this issue Sep 13, 2013 · 3 comments
Labels
bug Bugs
Milestone

Comments

@knokknok
Copy link
Contributor

Not sure how to describe this and what the real cause is but you can try this:

library(knitr)
knit(output='test.tex', text='
<<chunk1>>=
par(mfrow=n2mfrow(9))
for(i in 1:9)
  image(volcano)
# comment
@
<<chunk2>>=
par(mfrow=n2mfrow(9))
for(i in 1:9)
  image(volcano)
@
<<chunk3>>=
par(mfrow=n2mfrow(7))
for(i in 1:7)
  image(volcano)
# comment
@
<<chunk4>>=
par(mfrow=n2mfrow(7))
for(i in 1:7)
  image(volcano)
@
')

On my setup, chunk 3 does not produce a figure.

> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] fr_FR.UTF-8/fr_FR.UTF-8/fr_FR.UTF-8/C/fr_FR.UTF-8/fr_FR.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] knitr_1.4.9

loaded via a namespace (and not attached):
[1] evaluate_0.4.7 formatR_0.9    highr_0.2.1    stringr_0.6.2  tools_3.0.1
@yihui
Copy link
Owner

yihui commented Sep 13, 2013

That is a bug of the evaluate package. I'll try to fix it. Big thanks for making the 600th issue! 😄

@knokknok
Copy link
Contributor Author

Thanks for the fix!

Big thanks for making the 600th issue!

Yep I noticed that but I managed to restrain from this kind of behaviour : http://www.xkcd.com/1258/ 😄

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bugs
Projects
None yet
Development

No branches or pull requests

2 participants