-
-
Notifications
You must be signed in to change notification settings - Fork 877
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
Allow numeric values for fig.keep
to index plots
#1265
Comments
That looks okay to me. Could you submit a pull request? Thanks! |
I also proposed an update for http://yihui.name/knitr/options/. Should this be a separate pull request? (Not sure about the correct workflow for this.) |
Yes, the docs are in the gh-pages branch. Please submit a separate PR for that. Thanks! |
Ok. Slowly I'm getting used to how this works … ;) |
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. |
This is a feature request based on this question on SO.
So far,
fig.keep
accepts only'high'
,'none'
,'first'
,'last'
(and, implicitly,'all'
) . Would it be possible to extend the functionality in a way similar toecho
, such thatfig.keep = c(1, 3)
keeps the first and the third plot?One potential drawback is that
fig.keep = c(1, 3)
cannot be combined withfig.kepp = 'high'
. Therefore, the indices would implicitly always refer to low-level plots. (The same already applies tofig.keep = 'first'
).I think the implementation could be quite simple: In block.R, line 222, an additional
if
clause could be added:However, I am not entirely sure about the contents of
res
andfigs
, so my suggested code might be wrong.The text was updated successfully, but these errors were encountered: