You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our last session I mentioned that there is a way to extract the code, which is contained in the code chunks, from an RMarkdown document. The purl() function from the knitr package will do this.
Imagine your have an RMarkdown file analysis.Rmd. You will specify the input path to this file and then the path to the file you wish to create.
The output in the analysis-code.R file, by default, will only include those comments which appear inside a code chunk -other markup and prose will not. The purl() function has other options that you can tweak. Take a look at the documentation if you'd like to explore this function with ?knitr::purl.
The text was updated successfully, but these errors were encountered:
In our last session I mentioned that there is a way to extract the code, which is contained in the code chunks, from an RMarkdown document. The
purl()
function from theknitr
package will do this.Imagine your have an RMarkdown file
analysis.Rmd
. You will specify the input path to this file and then the path to the file you wish to create.The output in the
analysis-code.R
file, by default, will only include those comments which appear inside a code chunk -other markup and prose will not. Thepurl()
function has other options that you can tweak. Take a look at the documentation if you'd like to explore this function with?knitr::purl
.The text was updated successfully, but these errors were encountered: