Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jthomasmock/child-document
https://github.com/jthomasmock/child-document
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jthomasmock/child-document
- Owner: jthomasmock
- Created: 2021-10-11T16:14:27.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-11T16:16:40.000Z (about 3 years ago)
- Last Synced: 2024-12-18T01:08:42.956Z (23 days ago)
- Language: HTML
- Size: 611 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.html
Awesome Lists containing this project
README
README
h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
code{white-space: pre;}
if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
}.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
img {
max-width:100%;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
pre code {
padding: 0;
}.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
border: 1px solid #ddd;
border-radius: 4px;
}.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "";
border: none;
}.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}.tabset-dropdown > .nav-tabs > li.active {
display: block;
}.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
background-color: transparent;
}.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}.tabset-dropdown > .nav-tabs > li {
display: none;
}Child Document reports in RMarkdown
The goal of child-document is to show a quick reprex of Dr. Mowinckel’s question:
Rmd wishlist: a parametrized sub-section.
A way to input whole sections (text and chunks) with some parameters. I have q's following two basic logics, and thus two sets of text+chunk based on these. I'd love to not copy+paste + edit all these sections, just input as sub-report
— Athanasia Mowinckel (@DrMowinckels) October 11, 2021Workflow
There are 4 files:
parent-report.Rmd
: the core document that will be filled with additional parameterized and logical-dependent outputs
child-report.Rmd
: the child RMarkdown doc that will be parsed inline in the parent
whisker-child.Rmd
: the child RMarkdown doc that will be parsed and filled according towhisker
notation (ie{{var}}
gets filled with the actual value ofvar
)
rmd-render-script.R
contains the code to render our report with the specified parameters and a specific nameFurther reading
For Child documents, see the chapter on Child Documents in the RMarkdown Cookbook.
For parameterized RMarkdown, see the chapter on Parameterized reports.
For a bigger overview of all the cool things you can do with RMarkdown, see my video recording on that topic.
// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.odd').parent('tbody').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});$(document).ready(function () {
window.buildTabsets("TOC");
});$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open');
});
});(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();