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

Purl option to only output echoed chunks #519

Closed
sebastian-c opened this issue Apr 18, 2013 · 4 comments
Closed

Purl option to only output echoed chunks #519

sebastian-c opened this issue Apr 18, 2013 · 4 comments
Labels
feature Feature requests
Milestone

Comments

@sebastian-c
Copy link

At the moment, purl has a documentation = 0 argument which means that only the code from the Rmd or Rnw document will be produced.

What if I have some preamble that I don't wish to include in the resulting R code? Say the setting up of knitr chunk options or other minor options.

To resolve this, perhaps an option to only produce code which is echoed? That is, produce an R file containing only the code visible in the document.

@yihui
Copy link
Owner

yihui commented Apr 18, 2013

How about include=FALSE? This option often means we want to hide everything.

echo=FALSE is not a good idea, because even if we do not echo the code in the document, we may need it in the R script for completeness.

@yihui yihui closed this as completed in 02539b5 Apr 25, 2013
@yihui
Copy link
Owner

yihui commented Jun 21, 2013

Sorry I changed my mind and now it should be the chunk option purl=FALSE.

@sebastian-c
Copy link
Author

That's a good idea. It neatly solves all problems regarding echo and include.

@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
feature Feature requests
Projects
None yet
Development

No branches or pull requests

2 participants