-
Notifications
You must be signed in to change notification settings - Fork 7
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
Including (sub) documents #1
Comments
Ah thank you so much! As I guess you read I was considering running |
That should work I think. There are really powerful tools to create documents with r and markdown but imho they lack simple examples to help users get started. hadley/rsmith , for example, seems really interesting but it is not very clear how to use whisker tempting with rmarkdown documents. Anyway, keep posting!
|
Code chunk now in the example file analysis.Rmd rather than the YAML ```{r child = c("analysis-i.md", "analysis-ii.md", "analysis-iii.md")} # The 'children' of the 'main' document can be specified (with the same result as the `include: after_body:` field in the YAML header) with either an explicit list: # # ```{r child = c("analysis-i.md", "analysis-ii.md", "analysis-iii.md")} # ``` # # or a call to `list.files`: # # ```{r child = list.files(pattern = 'analysis-.*?\\.md')} # ``` # The former is preferable, but NB throws error if pattern doesn't match since child = character(0) ``` Using the explicit list rather than file globbing for now as commented, an if statement would be needed to use |
Saw your blog plots. Thanks for putting that together. FYI a convenient way to include (sub) documents in another Rmd file is to use the
child
option (http://stackoverflow.com/a/17605475/1974918)The text was updated successfully, but these errors were encountered: