Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Nov 27, 2023
1 parent 7bb4e1c commit a339f16
Show file tree
Hide file tree
Showing 46 changed files with 10,758 additions and 15,644 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Suggests:
broom.mixed,
car,
clubSandwich,
correlation,
covr,
did,
digest,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,11 @@ details, see the vignettes:
- [`modelsummary` extensions and
customization](vignettes/modelsummary_extension.html)
- [Themes and Styles](vignettes/appearance.html)

## Test image

``` r
with(mtcars, plot(wt, mpg))
```

![](README.markdown_strict_files/figure-markdown_strict/unnamed-chunk-1-1.png)
8 changes: 8 additions & 0 deletions README.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,11 @@ You will find that there are a million ways to customize the tables and plots pr
* [Model Plots](vignettes/modelplot.html)
* [`modelsummary` extensions and customization](vignettes/modelsummary_extension.html)
* [Themes and Styles](vignettes/appearance.html)



##### Test image

```{r}
with(mtcars, plot(wt, mpg))
```
145 changes: 24 additions & 121 deletions docs/CITATION.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.451">
<meta name="generator" content="quarto-1.4.151">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down Expand Up @@ -46,13 +46,12 @@
"collapse-after": 3,
"panel-placement": "end",
"type": "overlay",
"limit": 50,
"limit": 20,
"keyboard-shortcut": [
"f",
"/",
"s"
],
"show-item-context": false,
"language": {
"search-no-results-text": "No results",
"search-matching-documents-text": "matching documents",
Expand All @@ -74,7 +73,7 @@

<div id="quarto-search-results"></div>
<header id="quarto-header" class="headroom fixed-top">
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<nav class="navbar navbar-expand-lg navbar-dark ">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a class="navbar-brand" href="./index.html">
Expand All @@ -88,9 +87,9 @@
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll ms-auto">
<li class="nav-item compact">
<a class="nav-link" href="https://github.com/vincentarelbundock/modelsummary/issues/"> <i class="bi bi-github" role="img" aria-label="modelsummary GitHub">
<a class="nav-link" href="https://github.com/vincentarelbundock/modelsummary/issues/" rel="" target=""><i class="bi bi-github" role="img" aria-label="modelsummary GitHub">
</i>
<span class="menu-text"></span></a>
<span class="menu-text"></span></a>
</li>
</ul>
</div> <!-- /navcollapse -->
Expand All @@ -108,9 +107,9 @@
<button type="button" class="quarto-btn-toggle btn" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar,#quarto-sidebar-glass" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<i class="bi bi-layout-text-sidebar-reverse"></i>
</button>
<nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./CITATION.html"><span class="chapter-title">Citation</span></a></li></ol></nav>
<a class="flex-grow-1" role="button" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar,#quarto-sidebar-glass" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
</a>
<nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./CITATION.html"><span class="chapter-title">Citation</span></a></li></ol></nav>
<a class="flex-grow-1" role="button" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar,#quarto-sidebar-glass" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
</a>
</div>
</nav>
</header>
Expand Down Expand Up @@ -350,10 +349,8 @@ <h1 class="title"><span class="chapter-title">Citation</span></h1>
</div>



</header>


<pre class="verbatim"><code>To cite modelsummary in publications use:

Arel-Bundock V (2022). “modelsummary: Data and Model Summaries in R.”
Expand Down Expand Up @@ -494,57 +491,18 @@ <h1 class="title"><span class="chapter-title">Citation</span></h1>
}
const xrefs = window.document.querySelectorAll('a.quarto-xref');
const processXRef = (id, note) => {
// Strip column container classes
const stripColumnClz = (el) => {
el.classList.remove("page-full", "page-columns");
if (el.children) {
for (const child of el.children) {
stripColumnClz(child);
}
}
}
stripColumnClz(note)
const typesetMath = (el) => {
if (window.MathJax) {
// MathJax Typeset
window.MathJax.typeset([el]);
} else if (window.katex) {
// KaTeX Render
var mathElements = el.getElementsByClassName("math");
var macros = [];
for (var i = 0; i < mathElements.length; i++) {
var texText = mathElements[i].firstChild;
if (mathElements[i].tagName == "SPAN") {
window.katex.render(texText.data, mathElements[i], {
displayMode: mathElements[i].classList.contains('display'),
throwOnError: false,
macros: macros,
fleqn: false
});
}
}
}
}
if (id === null || id.startsWith('sec-')) {
if (id.startsWith('sec-')) {
// Special case sections, only their first couple elements
const container = document.createElement("div");
if (note.children && note.children.length > 2) {
for (let i = 0; i < 2; i++) {
container.appendChild(note.children[i].cloneNode(true));
}
typesetMath(container);
return container.innerHTML
} else {
typesetMath(note);
return note.innerHTML;
}
} else {
// Remove any anchor links if they are present
const anchorLink = note.querySelector('a.anchorjs-link');
if (anchorLink) {
anchorLink.remove();
}
typesetMath(note);
return note.innerHTML;
}
}
Expand All @@ -554,56 +512,27 @@ <h1 class="title"><span class="chapter-title">Citation</span></h1>
instance.disable();
let url = xref.getAttribute('href');
let hash = undefined;
if (url.startsWith('#')) {
hash = url;
} else {
try { hash = new URL(url).hash; } catch {}
}
if (hash) {
const id = hash.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
if (note !== null) {
try {
const html = processXRef(id, note.cloneNode(true));
instance.setContent(html);
} finally {
instance.enable();
instance.show();
}
} else {
// See if we can fetch this
fetch(url.split('#')[0])
.then(res => res.text())
.then(html => {
const parser = new DOMParser();
const htmlDoc = parser.parseFromString(html, "text/html");
const note = htmlDoc.getElementById(id);
if (note !== null) {
const html = processXRef(id, note);
instance.setContent(html);
}
}).finally(() => {
instance.enable();
instance.show();
});
try { hash = new URL(url).hash; } catch {}
const id = hash.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
if (note !== null) {
try {
const html = processXRef(id, note);
instance.setContent(html);
} finally {
instance.enable();
instance.show();
}
} else {
// See if we can fetch a full url (with no hash to target)
// This is a special case and we should probably do some content thinning / targeting
fetch(url)
// See if we can fetch this
fetch(url.split('#')[0])
.then(res => res.text())
.then(html => {
const parser = new DOMParser();
const htmlDoc = parser.parseFromString(html, "text/html");
const note = htmlDoc.querySelector('main.content');
const note = htmlDoc.getElementById(id);
if (note !== null) {
// This should only happen for chapter cross references
// (since there is no id in the URL)
// remove the first header
if (note.children.length > 0 && note.children[0].tagName === "HEADER") {
note.children[0].remove();
}
const html = processXRef(null, note);
const html = processXRef(id, note);
instance.setContent(html);
}
}).finally(() => {
Expand Down Expand Up @@ -681,32 +610,6 @@ <h1 class="title"><span class="chapter-title">Citation</span></h1>
});
selectedAnnoteEl = undefined;
};
// Handle positioning of the toggle
window.addEventListener(
"resize",
throttle(() => {
elRect = undefined;
if (selectedAnnoteEl) {
selectCodeLines(selectedAnnoteEl);
}
}, 10)
);
function throttle(fn, ms) {
let throttle = false;
let timer;
return (...args) => {
if(!throttle) { // first call gets through
fn.apply(this, args);
throttle = true;
} else { // all the others get throttled
if(timer) clearTimeout(timer); // cancel #2
timer = setTimeout(() => {
fn.apply(this, args);
timer = throttle = false;
}, ms);
}
};
}
// Attach click handler to the DT
const annoteDls = window.document.querySelectorAll('dt[data-target-cell]');
for (const annoteDlNode of annoteDls) {
Expand Down Expand Up @@ -768,7 +671,7 @@ <h1 class="title"><span class="chapter-title">Citation</span></h1>
</script>
<nav class="page-navigation">
<div class="nav-page nav-page-previous">
<a href="./LICENSE.html" class="pagination-link aria-label=" <span="">9&nbsp; <span class="chapter-title">License</span>"&gt;
<a href="./LICENSE.html" class="pagination-link">
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-title">License</span></span>
</a>
</div>
Expand Down
1 change: 0 additions & 1 deletion docs/CNAME

This file was deleted.

Loading

0 comments on commit a339f16

Please sign in to comment.