Debian Codegraph @

inst/doc/pander.html

raw symbols SCIP
1 <!DOCTYPE html>
2
3 <html>
4
5 <head>
6
7 <meta charset="utf-8" />
8 <meta name="generator" content="pandoc" />
9 <meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
10
11 <meta name="viewport" content="width=device-width, initial-scale=1" />
12
13 <meta name="author" content="Roman Tsegelskyi, Gergely Daróczi" />
14
15 <meta name="date" content="2021-06-11" />
16
17 <title>Rendering markdown with pander</title>
18
19 <script src="data:application/javascript;base64,Ly8gUGFuZG9jIDIuOSBhZGRzIGF0dHJpYnV0ZXMgb24gYm90aCBoZWFkZXIgYW5kIGRpdi4gV2UgcmVtb3ZlIHRoZSBmb3JtZXIgKHRvCi8vIGJlIGNvbXBhdGlibGUgd2l0aCB0aGUgYmVoYXZpb3Igb2YgUGFuZG9jIDwgMi44KS4KZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignRE9NQ29udGVudExvYWRlZCcsIGZ1bmN0aW9uKGUpIHsKICB2YXIgaHMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCJkaXYuc2VjdGlvbltjbGFzcyo9J2xldmVsJ10gPiA6Zmlyc3QtY2hpbGQiKTsKICB2YXIgaSwgaCwgYTsKICBmb3IgKGkgPSAwOyBpIDwgaHMubGVuZ3RoOyBpKyspIHsKICAgIGggPSBoc1tpXTsKICAgIGlmICghL15oWzEtNl0kL2kudGVzdChoLnRhZ05hbWUpKSBjb250aW51ZTsgIC8vIGl0IHNob3VsZCBiZSBhIGhlYWRlciBoMS1oNgogICAgYSA9IGguYXR0cmlidXRlczsKICAgIHdoaWxlIChhLmxlbmd0aCA+IDApIGgucmVtb3ZlQXR0cmlidXRlKGFbMF0ubmFtZSk7CiAgfQp9KTsK"></script>
20
21 <style type="text/css">
22 code{white-space: pre-wrap;}
23 span.smallcaps{font-variant: small-caps;}
24 span.underline{text-decoration: underline;}
25 div.column{display: inline-block; vertical-align: top; width: 50%;}
26 div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
27 ul.task-list{list-style: none;}
28 </style>
29
30
31 <style type="text/css">
32 code {
33 white-space: pre;
34 }
35 .sourceCode {
36 overflow: visible;
37 }
38 </style>
39 <style type="text/css" data-origin="pandoc">
40 pre > code.sourceCode { white-space: pre; position: relative; }
41 pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
42 pre > code.sourceCode > span:empty { height: 1.2em; }
43 .sourceCode { overflow: visible; }
44 code.sourceCode > span { color: inherit; text-decoration: inherit; }
45 div.sourceCode { margin: 1em 0; }
46 pre.sourceCode { margin: 0; }
47 @media screen {
48 div.sourceCode { overflow: auto; }
49 }
50 @media print {
51 pre > code.sourceCode { white-space: pre-wrap; }
52 pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
53 }
54 pre.numberSource code
55 { counter-reset: source-line 0; }
56 pre.numberSource code > span
57 { position: relative; left: -4em; counter-increment: source-line; }
58 pre.numberSource code > span > a:first-child::before
59 { content: counter(source-line);
60 position: relative; left: -1em; text-align: right; vertical-align: baseline;
61 border: none; display: inline-block;
62 -webkit-touch-callout: none; -webkit-user-select: none;
63 -khtml-user-select: none; -moz-user-select: none;
64 -ms-user-select: none; user-select: none;
65 padding: 0 4px; width: 4em;
66 color: #aaaaaa;
67 }
68 pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
69 div.sourceCode
70 { }
71 @media screen {
72 pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
73 }
74 code span.al { color: #ff0000; font-weight: bold; } /* Alert */
75 code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
76 code span.at { color: #7d9029; } /* Attribute */
77 code span.bn { color: #40a070; } /* BaseN */
78 code span.bu { } /* BuiltIn */
79 code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
80 code span.ch { color: #4070a0; } /* Char */
81 code span.cn { color: #880000; } /* Constant */
82 code span.co { color: #60a0b0; font-style: italic; } /* Comment */
83 code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
84 code span.do { color: #ba2121; font-style: italic; } /* Documentation */
85 code span.dt { color: #902000; } /* DataType */
86 code span.dv { color: #40a070; } /* DecVal */
87 code span.er { color: #ff0000; font-weight: bold; } /* Error */
88 code span.ex { } /* Extension */
89 code span.fl { color: #40a070; } /* Float */
90 code span.fu { color: #06287e; } /* Function */
91 code span.im { } /* Import */
92 code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
93 code span.kw { color: #007020; font-weight: bold; } /* Keyword */
94 code span.op { color: #666666; } /* Operator */
95 code span.ot { color: #007020; } /* Other */
96 code span.pp { color: #bc7a00; } /* Preprocessor */
97 code span.sc { color: #4070a0; } /* SpecialChar */
98 code span.ss { color: #bb6688; } /* SpecialString */
99 code span.st { color: #4070a0; } /* String */
100 code span.va { color: #19177c; } /* Variable */
101 code span.vs { color: #4070a0; } /* VerbatimString */
102 code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
103
104 </style>
105 <script>
106 // apply pandoc div.sourceCode style to pre.sourceCode instead
107 (function() {
108 var sheets = document.styleSheets;
109 for (var i = 0; i < sheets.length; i++) {
110 if (sheets[i].ownerNode.dataset["origin"] !== "pandoc") continue;
111 try { var rules = sheets[i].cssRules; } catch (e) { continue; }
112 for (var j = 0; j < rules.length; j++) {
113 var rule = rules[j];
114 // check if there is a div.sourceCode rule
115 if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") continue;
116 var style = rule.style.cssText;
117 // check if color or background-color is set
118 if (rule.style.color === '' && rule.style.backgroundColor === '') continue;
119 // replace div.sourceCode by a pre.sourceCode rule
120 sheets[i].deleteRule(j);
121 sheets[i].insertRule('pre.sourceCode{' + style + '}', j);
122 }
123 }
124 })();
125 </script>
126
127
128
129
130 <link rel="stylesheet" href="data:text/css,body%20%7B%0Abackground%2Dcolor%3A%20%23fff%3B%0Amargin%3A%201em%20auto%3B%0Amax%2Dwidth%3A%20700px%3B%0Aoverflow%3A%20visible%3B%0Apadding%2Dleft%3A%202em%3B%0Apadding%2Dright%3A%202em%3B%0Afont%2Dfamily%3A%20%22Open%20Sans%22%2C%20%22Helvetica%20Neue%22%2C%20Helvetica%2C%20Arial%2C%20sans%2Dserif%3B%0Afont%2Dsize%3A%2014px%3B%0Aline%2Dheight%3A%201%2E35%3B%0A%7D%0A%23TOC%20%7B%0Aclear%3A%20both%3B%0Amargin%3A%200%200%2010px%2010px%3B%0Apadding%3A%204px%3B%0Awidth%3A%20400px%3B%0Aborder%3A%201px%20solid%20%23CCCCCC%3B%0Aborder%2Dradius%3A%205px%3B%0Abackground%2Dcolor%3A%20%23f6f6f6%3B%0Afont%2Dsize%3A%2013px%3B%0Aline%2Dheight%3A%201%2E3%3B%0A%7D%0A%23TOC%20%2Etoctitle%20%7B%0Afont%2Dweight%3A%20bold%3B%0Afont%2Dsize%3A%2015px%3B%0Amargin%2Dleft%3A%205px%3B%0A%7D%0A%23TOC%20ul%20%7B%0Apadding%2Dleft%3A%2040px%3B%0Amargin%2Dleft%3A%20%2D1%2E5em%3B%0Amargin%2Dtop%3A%205px%3B%0Amargin%2Dbottom%3A%205px%3B%0A%7D%0A%23TOC%20ul%20ul%20%7B%0Amargin%2Dleft%3A%20%2D2em%3B%0A%7D%0A%23TOC%20li%20%7B%0Aline%2Dheight%3A%2016px%3B%0A%7D%0Atable%20%7B%0Amargin%3A%201em%20auto%3B%0Aborder%2Dwidth%3A%201px%3B%0Aborder%2Dcolor%3A%20%23DDDDDD%3B%0Aborder%2Dstyle%3A%20outset%3B%0Aborder%2Dcollapse%3A%20collapse%3B%0A%7D%0Atable%20th%20%7B%0Aborder%2Dwidth%3A%202px%3B%0Apadding%3A%205px%3B%0Aborder%2Dstyle%3A%20inset%3B%0A%7D%0Atable%20td%20%7B%0Aborder%2Dwidth%3A%201px%3B%0Aborder%2Dstyle%3A%20inset%3B%0Aline%2Dheight%3A%2018px%3B%0Apadding%3A%205px%205px%3B%0A%7D%0Atable%2C%20table%20th%2C%20table%20td%20%7B%0Aborder%2Dleft%2Dstyle%3A%20none%3B%0Aborder%2Dright%2Dstyle%3A%20none%3B%0A%7D%0Atable%20thead%2C%20table%20tr%2Eeven%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0A%7D%0Ap%20%7B%0Amargin%3A%200%2E5em%200%3B%0A%7D%0Ablockquote%20%7B%0Abackground%2Dcolor%3A%20%23f6f6f6%3B%0Apadding%3A%200%2E25em%200%2E75em%3B%0A%7D%0Ahr%20%7B%0Aborder%2Dstyle%3A%20solid%3B%0Aborder%3A%20none%3B%0Aborder%2Dtop%3A%201px%20solid%20%23777%3B%0Amargin%3A%2028px%200%3B%0A%7D%0Adl%20%7B%0Amargin%2Dleft%3A%200%3B%0A%7D%0Adl%20dd%20%7B%0Amargin%2Dbottom%3A%2013px%3B%0Amargin%2Dleft%3A%2013px%3B%0A%7D%0Adl%20dt%20%7B%0Afont%2Dweight%3A%20bold%3B%0A%7D%0Aul%20%7B%0Amargin%2Dtop%3A%200%3B%0A%7D%0Aul%20li%20%7B%0Alist%2Dstyle%3A%20circle%20outside%3B%0A%7D%0Aul%20ul%20%7B%0Amargin%2Dbottom%3A%200%3B%0A%7D%0Apre%2C%20code%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0Aborder%2Dradius%3A%203px%3B%0Acolor%3A%20%23333%3B%0Awhite%2Dspace%3A%20pre%2Dwrap%3B%20%0A%7D%0Apre%20%7B%0Aborder%2Dradius%3A%203px%3B%0Amargin%3A%205px%200px%2010px%200px%3B%0Apadding%3A%2010px%3B%0A%7D%0Apre%3Anot%28%5Bclass%5D%29%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0A%7D%0Acode%20%7B%0Afont%2Dfamily%3A%20Consolas%2C%20Monaco%2C%20%27Courier%20New%27%2C%20monospace%3B%0Afont%2Dsize%3A%2085%25%3B%0A%7D%0Ap%20%3E%20code%2C%20li%20%3E%20code%20%7B%0Apadding%3A%202px%200px%3B%0A%7D%0Adiv%2Efigure%20%7B%0Atext%2Dalign%3A%20center%3B%0A%7D%0Aimg%20%7B%0Abackground%2Dcolor%3A%20%23FFFFFF%3B%0Apadding%3A%202px%3B%0Aborder%3A%201px%20solid%20%23DDDDDD%3B%0Aborder%2Dradius%3A%203px%3B%0Aborder%3A%201px%20solid%20%23CCCCCC%3B%0Amargin%3A%200%205px%3B%0A%7D%0Ah1%20%7B%0Amargin%2Dtop%3A%200%3B%0Afont%2Dsize%3A%2035px%3B%0Aline%2Dheight%3A%2040px%3B%0A%7D%0Ah2%20%7B%0Aborder%2Dbottom%3A%204px%20solid%20%23f7f7f7%3B%0Apadding%2Dtop%3A%2010px%3B%0Apadding%2Dbottom%3A%202px%3B%0Afont%2Dsize%3A%20145%25%3B%0A%7D%0Ah3%20%7B%0Aborder%2Dbottom%3A%202px%20solid%20%23f7f7f7%3B%0Apadding%2Dtop%3A%2010px%3B%0Afont%2Dsize%3A%20120%25%3B%0A%7D%0Ah4%20%7B%0Aborder%2Dbottom%3A%201px%20solid%20%23f7f7f7%3B%0Amargin%2Dleft%3A%208px%3B%0Afont%2Dsize%3A%20105%25%3B%0A%7D%0Ah5%2C%20h6%20%7B%0Aborder%2Dbottom%3A%201px%20solid%20%23ccc%3B%0Afont%2Dsize%3A%20105%25%3B%0A%7D%0Aa%20%7B%0Acolor%3A%20%230033dd%3B%0Atext%2Ddecoration%3A%20none%3B%0A%7D%0Aa%3Ahover%20%7B%0Acolor%3A%20%236666ff%3B%20%7D%0Aa%3Avisited%20%7B%0Acolor%3A%20%23800080%3B%20%7D%0Aa%3Avisited%3Ahover%20%7B%0Acolor%3A%20%23BB00BB%3B%20%7D%0Aa%5Bhref%5E%3D%22http%3A%22%5D%20%7B%0Atext%2Ddecoration%3A%20underline%3B%20%7D%0Aa%5Bhref%5E%3D%22https%3A%22%5D%20%7B%0Atext%2Ddecoration%3A%20underline%3B%20%7D%0A%0Acode%20%3E%20span%2Ekw%20%7B%20color%3A%20%23555%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%0Acode%20%3E%20span%2Edt%20%7B%20color%3A%20%23902000%3B%20%7D%20%0Acode%20%3E%20span%2Edv%20%7B%20color%3A%20%2340a070%3B%20%7D%20%0Acode%20%3E%20span%2Ebn%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Efl%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Ech%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Est%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Eco%20%7B%20color%3A%20%23888888%3B%20font%2Dstyle%3A%20italic%3B%20%7D%20%0Acode%20%3E%20span%2Eot%20%7B%20color%3A%20%23007020%3B%20%7D%20%0Acode%20%3E%20span%2Eal%20%7B%20color%3A%20%23ff0000%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%0Acode%20%3E%20span%2Efu%20%7B%20color%3A%20%23900%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%0Acode%20%3E%20span%2Eer%20%7B%20color%3A%20%23a61717%3B%20background%2Dcolor%3A%20%23e3d2d2%3B%20%7D%20%0A" type="text/css" />
131
132
133
134
135 </head>
136
137 <body>
138
139
140
141
142 <h1 class="title toc-ignore">Rendering markdown with pander</h1>
143 <h4 class="author">Roman Tsegelskyi, Gergely Daróczi</h4>
144 <h4 class="date">2021-06-11</h4>
145
146
147
148 <p><code>Pander</code> is designed to provide a minimal and easy tool for rendering <code>R</code> objects into <a href="https://pandoc.org/">Pandoc</a>’s markdown. This vignette aims to introduce the <code>pander</code> package and its core pieces of functionality. It is intended to be a general overview with pointers to places with detailed information. This vignette will talk about:</p>
149 <ul>
150 <li>core functionality for rendering objects in <code>Pandoc</code>’s markdown with generic S3 <a href="#rendering-r-objects">pander method</a>.</li>
151 <li>functionality for capturing various information when evaluating R expressions with <a href="#evals">evals</a>.</li>
152 <li>report generation with <a href="#brew-to-pandoc">Pandoc.brew</a>.</li>
153 <li>globally adjustable options through <a href="#general-options">panderOptions/evalsOptions</a>.</li>
154 </ul>
155 <div id="rendering-r-objects" class="section level2">
156 <h2>Rendering R objects</h2>
157 <p>The core functionality of <code>pander</code> is centered around rendering <code>R</code> objects into <code>Pandoc</code>’s markdown. Let’s dive in to a demo of the most common usage of <code>pander</code>:</p>
158 <div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">pander</span>(<span class="fu">head</span>(iris))</span>
159 <span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
160 <span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; -------------------------------------------------------------------</span></span>
161 <span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Sepal.Length Sepal.Width Petal.Length Petal.Width Species </span></span>
162 <span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; -------------- ------------- -------------- ------------- ---------</span></span>
163 <span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 5.1 3.5 1.4 0.2 setosa </span></span>
164 <span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
165 <span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 4.9 3 1.4 0.2 setosa </span></span>
166 <span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
167 <span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 4.7 3.2 1.3 0.2 setosa </span></span>
168 <span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
169 <span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 4.6 3.1 1.5 0.2 setosa </span></span>
170 <span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
171 <span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 5 3.6 1.4 0.2 setosa </span></span>
172 <span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
173 <span id="cb1-16"><a href="#cb1-16" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 5.4 3.9 1.7 0.4 setosa </span></span>
174 <span id="cb1-17"><a href="#cb1-17" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; -------------------------------------------------------------------</span></span>
175 <span id="cb1-18"><a href="#cb1-18" aria-hidden="true" tabindex="-1"></a><span class="fu">pander</span>(<span class="fu">head</span>(mtcars[<span class="dv">1</span><span class="sc">:</span><span class="dv">5</span>]))</span>
176 <span id="cb1-19"><a href="#cb1-19" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
177 <span id="cb1-20"><a href="#cb1-20" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; --------------------------------------------------------</span></span>
178 <span id="cb1-21"><a href="#cb1-21" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; mpg cyl disp hp drat </span></span>
179 <span id="cb1-22"><a href="#cb1-22" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; ----------------------- ------ ----- ------ ----- ------</span></span>
180 <span id="cb1-23"><a href="#cb1-23" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Mazda RX4 21 6 160 110 3.9 </span></span>
181 <span id="cb1-24"><a href="#cb1-24" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
182 <span id="cb1-25"><a href="#cb1-25" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Mazda RX4 Wag 21 6 160 110 3.9 </span></span>
183 <span id="cb1-26"><a href="#cb1-26" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
184 <span id="cb1-27"><a href="#cb1-27" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Datsun 710 22.8 4 108 93 3.85 </span></span>
185 <span id="cb1-28"><a href="#cb1-28" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
186 <span id="cb1-29"><a href="#cb1-29" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Hornet 4 Drive 21.4 6 258 110 3.08 </span></span>
187 <span id="cb1-30"><a href="#cb1-30" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
188 <span id="cb1-31"><a href="#cb1-31" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Hornet Sportabout 18.7 8 360 175 3.15 </span></span>
189 <span id="cb1-32"><a href="#cb1-32" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
190 <span id="cb1-33"><a href="#cb1-33" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Valiant 18.1 6 225 105 2.76 </span></span>
191 <span id="cb1-34"><a href="#cb1-34" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; --------------------------------------------------------</span></span>
192 <span id="cb1-35"><a href="#cb1-35" aria-hidden="true" tabindex="-1"></a><span class="fu">pander</span>(<span class="fu">tabular</span>( (Species <span class="sc">+</span> <span class="dv">1</span>) <span class="sc">~</span> (<span class="at">n=</span><span class="dv">1</span>) <span class="sc">+</span> <span class="fu">Format</span>(<span class="at">digits=</span><span class="dv">2</span>)<span class="sc">*</span></span>
193 <span id="cb1-36"><a href="#cb1-36" aria-hidden="true" tabindex="-1"></a> (Sepal.Length <span class="sc">+</span> Sepal.Width)<span class="sc">*</span>(mean <span class="sc">+</span> sd), <span class="at">data=</span>iris ))</span>
194 <span id="cb1-37"><a href="#cb1-37" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
195 <span id="cb1-38"><a href="#cb1-38" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; -----------------------------------------------------------------</span></span>
196 <span id="cb1-39"><a href="#cb1-39" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Sepal.Length Sepal.Width </span></span>
197 <span id="cb1-40"><a href="#cb1-40" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Species n mean sd mean sd </span></span>
198 <span id="cb1-41"><a href="#cb1-41" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; ------------ ----- ---------------- ------ --------------- ------</span></span>
199 <span id="cb1-42"><a href="#cb1-42" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; setosa 50 5.01 0.35 3.43 0.38 </span></span>
200 <span id="cb1-43"><a href="#cb1-43" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
201 <span id="cb1-44"><a href="#cb1-44" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; versicolor 50 5.94 0.52 2.77 0.31 </span></span>
202 <span id="cb1-45"><a href="#cb1-45" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
203 <span id="cb1-46"><a href="#cb1-46" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; virginica 50 6.59 0.64 2.97 0.32 </span></span>
204 <span id="cb1-47"><a href="#cb1-47" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
205 <span id="cb1-48"><a href="#cb1-48" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; All 150 5.84 0.83 3.06 0.44 </span></span>
206 <span id="cb1-49"><a href="#cb1-49" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; -----------------------------------------------------------------</span></span></code></pre></div>
207 <p>As you have probably guessed, this is achieved via the generic <code>pander</code> <code>S3</code> method. Out of the box, <code>pander</code> supports a variety of classes:</p>
208 <div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">methods</span>(pander)</span>
209 <span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] pander.anova* pander.aov* pander.aovlist* </span></span>
210 <span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [4] pander.Arima* pander.call* pander.cast_df* </span></span>
211 <span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [7] pander.character* pander.clogit* pander.coxph* </span></span>
212 <span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [10] pander.cph* pander.CrossTable* pander.data.frame* </span></span>
213 <span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [13] pander.data.table* pander.Date* pander.default* </span></span>
214 <span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [16] pander.density* pander.describe* pander.ets* </span></span>
215 <span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [19] pander.evals* pander.factor* pander.formula* </span></span>
216 <span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [22] pander.ftable* pander.function* pander.glm* </span></span>
217 <span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [25] pander.Glm* pander.gtable* pander.htest* </span></span>
218 <span id="cb2-11"><a href="#cb2-11" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [28] pander.image* pander.irts* pander.list* </span></span>
219 <span id="cb2-12"><a href="#cb2-12" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [31] pander.lm* pander.lme* pander.logical* </span></span>
220 <span id="cb2-13"><a href="#cb2-13" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [34] pander.lrm* pander.manova* pander.matrix* </span></span>
221 <span id="cb2-14"><a href="#cb2-14" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [37] pander.microbenchmark* pander.name* pander.nls* </span></span>
222 <span id="cb2-15"><a href="#cb2-15" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [40] pander.NULL* pander.numeric* pander.ols* </span></span>
223 <span id="cb2-16"><a href="#cb2-16" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [43] pander.orm* pander.polr* pander.POSIXct* </span></span>
224 <span id="cb2-17"><a href="#cb2-17" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [46] pander.POSIXlt* pander.prcomp* pander.randomForest* </span></span>
225 <span id="cb2-18"><a href="#cb2-18" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [49] pander.rapport* pander.rlm* pander.sessionInfo* </span></span>
226 <span id="cb2-19"><a href="#cb2-19" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [52] pander.smooth.spline* pander.stat.table* pander.summary.aov* </span></span>
227 <span id="cb2-20"><a href="#cb2-20" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [55] pander.summary.aovlist* pander.summary.glm* pander.summary.lm* </span></span>
228 <span id="cb2-21"><a href="#cb2-21" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [58] pander.summary.lme* pander.summary.manova* pander.summary.nls* </span></span>
229 <span id="cb2-22"><a href="#cb2-22" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [61] pander.summary.polr* pander.summary.prcomp* pander.summary.rms* </span></span>
230 <span id="cb2-23"><a href="#cb2-23" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [64] pander.summary.survreg* pander.summary.table* pander.survdiff* </span></span>
231 <span id="cb2-24"><a href="#cb2-24" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [67] pander.survfit* pander.survreg* pander.table* </span></span>
232 <span id="cb2-25"><a href="#cb2-25" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [70] pander.tabular* pander.ts* pander.zoo* </span></span>
233 <span id="cb2-26"><a href="#cb2-26" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; see &#39;?methods&#39; for accessing help and source code</span></span></code></pre></div>
234 <p>If you think that pander lacks support for any other R class(es), please feel free to open a <a href="https://github.com/Rapporter/pander/pulls">ticket</a> suggesting a new feature or submit <a href="https://github.com/Rapporter/pander/issues">pull request</a> and we will be happy to extend the package.</p>
235 <p>Under the hood, <code>pander</code> S3 methods rely on different <code>pandoc.*</code> methods, where most of functionality is implemented in <code>pandoc.table</code> which is used for rendering tables. <code>pandoc.table</code> provides functionality similar to <code>knitr::kable</code> in rendering markdown, but also adds a truly rich functionality with a variety of rendering options inherited from <code>pander</code>. For more usage/implementation details and examples, please refer to the <code>pandoc.table</code> vignette, which can be accessed by <code>vignette(&#39;pandoc_table&#39;)</code> (and is also available <a href="https://rapporter.github.io/pander/pandoc_table.html">online</a>).</p>
236 </div>
237 <div id="evals" class="section level2">
238 <h2>Evals</h2>
239 <p>The <code>pander</code> package was originally developed in conjunction with <a href="https://github.com/Rapporter/rapport">rapport</a> package, when a need arose for a function that could evaluate <code>R</code> expressions while also capturing errors and warnings. So <code>evals</code> emerged and soon some further feature requests arose, like identifying if an R expression results in a plot, etc.</p>
240 <p>But probably it’s easier to explain what <code>evals</code> can do with a simple example:</p>
241 <div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">evals</span>(<span class="st">&#39;1:10&#39;</span>)</span>
242 <span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; INFO [2021-06-11 13:37:00] Command run: 1:10</span></span>
243 <span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; TRACE [2021-06-11 13:37:00] Cached result</span></span>
244 <span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; DEBUG [2021-06-11 13:37:00] Returned object: class = integer, length = 10, dim = , size = 96 bytes</span></span>
245 <span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [[1]]</span></span>
246 <span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; $src</span></span>
247 <span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] &quot;1:10&quot;</span></span>
248 <span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
249 <span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; $result</span></span>
250 <span id="cb3-10"><a href="#cb3-10" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] 1 2 3 4 5 6 7 8 9 10</span></span>
251 <span id="cb3-11"><a href="#cb3-11" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
252 <span id="cb3-12"><a href="#cb3-12" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; $output</span></span>
253 <span id="cb3-13"><a href="#cb3-13" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] &quot; [1] 1 2 3 4 5 6 7 8 9 10&quot;</span></span>
254 <span id="cb3-14"><a href="#cb3-14" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
255 <span id="cb3-15"><a href="#cb3-15" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; $type</span></span>
256 <span id="cb3-16"><a href="#cb3-16" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] &quot;integer&quot;</span></span>
257 <span id="cb3-17"><a href="#cb3-17" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
258 <span id="cb3-18"><a href="#cb3-18" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; $msg</span></span>
259 <span id="cb3-19"><a href="#cb3-19" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; $msg$messages</span></span>
260 <span id="cb3-20"><a href="#cb3-20" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; NULL</span></span>
261 <span id="cb3-21"><a href="#cb3-21" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
262 <span id="cb3-22"><a href="#cb3-22" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; $msg$warnings</span></span>
263 <span id="cb3-23"><a href="#cb3-23" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; NULL</span></span>
264 <span id="cb3-24"><a href="#cb3-24" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
265 <span id="cb3-25"><a href="#cb3-25" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; $msg$errors</span></span>
266 <span id="cb3-26"><a href="#cb3-26" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; NULL</span></span>
267 <span id="cb3-27"><a href="#cb3-27" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
268 <span id="cb3-28"><a href="#cb3-28" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
269 <span id="cb3-29"><a href="#cb3-29" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; $stdout</span></span>
270 <span id="cb3-30"><a href="#cb3-30" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; NULL</span></span>
271 <span id="cb3-31"><a href="#cb3-31" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
272 <span id="cb3-32"><a href="#cb3-32" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; attr(,&quot;class&quot;)</span></span>
273 <span id="cb3-33"><a href="#cb3-33" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] &quot;evals&quot;</span></span></code></pre></div>
274 <p><code>evals</code> is aimed at collecting as much information as possible while evaluating R code. It can evaluate a character vector of R expressions, and it returns a list of information captured while running them:</p>
275 <ul>
276 <li><code>src</code> holds the R expression,</li>
277 <li><code>result</code> contains the raw R object as-is,</li>
278 <li><code>output</code> represents how the R object is printed to the standard output,</li>
279 <li><code>type</code> is the class of the returned R object,</li>
280 <li><code>msg</code> is a list of possible messages captured while evaluating the R expression. Among other messages, warnings/errors will appear here.</li>
281 <li><code>stdout</code> contains what, if anything, was written to the standard output.</li>
282 </ul>
283 <p>For more usage/implementation details and examples, please refer to the <code>evals</code> vignette, which can be accessed by <code>vignette(&#39;evals&#39;)</code> (also available <a href="https://rapporter.github.io/pander/evals.html">online</a>).</p>
284 </div>
285 <div id="brew-to-pandoc" class="section level2">
286 <h2>Brew to Pandoc</h2>
287 <p>The <a href="https://cran.r-project.org/package=brew">brew</a> package, a templating framework for report generation, has not been updated since 2011, but it’s still some of R projects based on its simple design and useful literate programming features. For a quick overview, please see the following documents if you are not familiar with brew:</p>
288 <ul>
289 <li><a href="https://www.slideshare.net/xavierguardiola/building-a-reporting-sytem-with-brew">slides on “Building a reporting sytem with BREW”</a></li>
290 <li><a href="https://learnr.wordpress.com/2009/09/09/brew-creating-repetitive-reports/">learnr blogpost on brew</a></li>
291 </ul>
292 <p>A brew document is a simple text file with some special tags. <code>Pandoc.brew</code> uses only two of them (as building on a personalized version of Jeff’s really great brew function):</p>
293 <ul>
294 <li><code>&lt;% ... %&gt;</code> stands for running inline R commands as usual,</li>
295 <li><code>&lt;%= ... %&gt;</code> does pretty much the same but applies pander to the returning R object (instead of <code>cat</code> like the original brew function does). So inserting any R object into the tag would return it in Pandoc markdown format, with all possible error/warning messages, etc.</li>
296 </ul>
297 <p>The latter tries to be smart in some ways:</p>
298 <ul>
299 <li>A code chunk block (<code>R</code> commands between the tags) can return any number of values at any part of the block.</li>
300 <li>Plots and images are grabbed in the document, rendered to a png file and pander method would result in a Pandoc markdown formatted image link. This means that the image would be rendered/shown/included in the exported document.</li>
301 <li>All warnings/messages and errors are recorded in the blocks and returned in the document as footnotes or inline messages.</li>
302 <li>All heavy <code>R</code> commands (e.g. those taking more then 0.1 sec to evaluate) are cached so rebrewing a report would not result in a coffee break.</li>
303 </ul>
304 <p>Besides this, the custom brew function can do more and also less compared to the original brew package. First of all, the internal caching mechanism of brew has been rewritten for benefits besides improved caching. Quick example:</p>
305 <div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">str</span>(<span class="fu">Pandoc.brew</span>(<span class="at">text =</span><span class="st">&#39;Pi equals to `&lt;%= pi %&gt;`. And here are some random data: `&lt;%= runif(10)%&gt;`&#39;</span>))</span>
306 <span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Pi equals to `INFO [2021-06-11 13:37:00] Command run: pi</span></span>
307 <span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; TRACE [2021-06-11 13:37:00] Cached result</span></span>
308 <span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; DEBUG [2021-06-11 13:37:00] Returned object: class = numeric, length = 1, dim = , size = 56 bytes</span></span>
309 <span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; _3.142_`. And here are some random data: `INFO [2021-06-11 13:37:00] Command run: runif(10)</span></span>
310 <span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; TRACE [2021-06-11 13:37:00] Cached result</span></span>
311 <span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; DEBUG [2021-06-11 13:37:00] Returned object: class = numeric, length = 10, dim = , size = 176 bytes</span></span>
312 <span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; _0.39_, _0.7773_, _0.9606_, _0.4347_, _0.7125_, _0.4_, _0.3254_, _0.7571_, _0.2027_ and _0.7111_` </span></span>
313 <span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; List of 1</span></span>
314 <span id="cb4-10"><a href="#cb4-10" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; $ :List of 4</span></span>
315 <span id="cb4-11"><a href="#cb4-11" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; ..$ type : chr &quot;text&quot;</span></span>
316 <span id="cb4-12"><a href="#cb4-12" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; ..$ text :List of 2</span></span>
317 <span id="cb4-13"><a href="#cb4-13" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; .. ..$ raw : chr &quot;Pi equals to `&lt;%=pi%&gt;`. And here are some random data: `&lt;%=runif(10)%&gt;`\n&quot;</span></span>
318 <span id="cb4-14"><a href="#cb4-14" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; .. ..$ eval: chr &quot;Pi equals to `_3.142_`. And here are some random data: `_0.39_, _0.7773_, _0.9606_, _0.4347_, _0.7125_, _0.4_, &quot;| __truncated__</span></span>
319 <span id="cb4-15"><a href="#cb4-15" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; ..$ chunks:List of 2</span></span>
320 <span id="cb4-16"><a href="#cb4-16" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; .. ..$ raw : chr [1:2] &quot;&lt;%=pi%&gt;&quot; &quot;&lt;%=runif(10)%&gt;&quot;</span></span>
321 <span id="cb4-17"><a href="#cb4-17" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; .. ..$ eval: chr [1:2] &quot;_3.142_&quot; &quot;_0.39_, _0.7773_, _0.9606_, _0.4347_, _0.7125_, _0.4_, _0.3254_, _0.7571_, _0.2027_ and _0.7111_&quot;</span></span>
322 <span id="cb4-18"><a href="#cb4-18" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; ..$ msg :List of 3</span></span>
323 <span id="cb4-19"><a href="#cb4-19" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; .. ..$ messages: NULL</span></span>
324 <span id="cb4-20"><a href="#cb4-20" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; .. ..$ warnings: NULL</span></span>
325 <span id="cb4-21"><a href="#cb4-21" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; .. ..$ errors : NULL</span></span></code></pre></div>
326 <p>The package bundles some examples for <code>Pandoc.brew</code> to let you quickly check its features. To brew these examples on your machine, run the following commands:</p>
327 <pre><code>Pandoc.brew(system.file(&#39;examples/minimal.brew&#39;, package=&#39;pander&#39;))
328 Pandoc.brew(system.file(&#39;examples/minimal.brew&#39;, package=&#39;pander&#39;),
329 output = tempfile(), convert = &#39;html&#39;)
330
331 Pandoc.brew(system.file(&#39;examples/short-code-long-report.brew&#39;, package=&#39;pander&#39;))
332 Pandoc.brew(system.file(&#39;examples/short-code-long-report.brew&#39;, package=&#39;pander&#39;),
333 output = tempfile(), convert = &#39;html&#39;)
334
335 Pandoc.brew(system.file(&#39;examples/graphs.brew&#39;, package=&#39;pander&#39;))
336 Pandoc.brew(system.file(&#39;examples/graphs.brew&#39;, package=&#39;pander&#39;),
337 output = tempfile(), convert = &#39;html&#39;)</code></pre>
338 </div>
339 <div id="general-options" class="section level2">
340 <h2>General Options</h2>
341 <p>The package comes with a variety of globally adjustable options that have an effect on the result of your reports. A full list of options can be viewed by calling <code>?panderOptions</code> or in the online <a href="https://github.com/Rapporter/pander#general-options">readme</a>.</p>
342 <p>You can query and update these options with the <code>panderOptions</code> function:</p>
343 <div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a>pots <span class="ot">&lt;-</span> <span class="fu">panderOptions</span>(<span class="st">&quot;table.style&quot;</span>)</span>
344 <span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="fu">panderOptions</span>(<span class="st">&quot;table.style&quot;</span>, <span class="st">&quot;simple&quot;</span>)</span>
345 <span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="fu">pander</span>(mtcars[<span class="dv">1</span><span class="sc">:</span><span class="dv">3</span>, <span class="dv">1</span><span class="sc">:</span><span class="dv">4</span>])</span>
346 <span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
347 <span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
348 <span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; mpg cyl disp hp </span></span>
349 <span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; ------------------- ------ ----- ------ -----</span></span>
350 <span id="cb6-8"><a href="#cb6-8" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Mazda RX4 21 6 160 110 </span></span>
351 <span id="cb6-9"><a href="#cb6-9" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Mazda RX4 Wag 21 6 160 110 </span></span>
352 <span id="cb6-10"><a href="#cb6-10" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Datsun 710 22.8 4 108 93</span></span>
353 <span id="cb6-11"><a href="#cb6-11" aria-hidden="true" tabindex="-1"></a><span class="fu">pander</span>(<span class="fu">head</span>(iris))</span>
354 <span id="cb6-12"><a href="#cb6-12" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
355 <span id="cb6-13"><a href="#cb6-13" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
356 <span id="cb6-14"><a href="#cb6-14" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Sepal.Length Sepal.Width Petal.Length Petal.Width Species </span></span>
357 <span id="cb6-15"><a href="#cb6-15" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; -------------- ------------- -------------- ------------- ---------</span></span>
358 <span id="cb6-16"><a href="#cb6-16" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 5.1 3.5 1.4 0.2 setosa </span></span>
359 <span id="cb6-17"><a href="#cb6-17" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 4.9 3 1.4 0.2 setosa </span></span>
360 <span id="cb6-18"><a href="#cb6-18" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 4.7 3.2 1.3 0.2 setosa </span></span>
361 <span id="cb6-19"><a href="#cb6-19" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 4.6 3.1 1.5 0.2 setosa </span></span>
362 <span id="cb6-20"><a href="#cb6-20" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 5 3.6 1.4 0.2 setosa </span></span>
363 <span id="cb6-21"><a href="#cb6-21" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 5.4 3.9 1.7 0.4 setosa</span></span>
364 <span id="cb6-22"><a href="#cb6-22" aria-hidden="true" tabindex="-1"></a><span class="fu">panderOptions</span>(<span class="st">&quot;table.style&quot;</span>, <span class="st">&quot;grid&quot;</span>)</span>
365 <span id="cb6-23"><a href="#cb6-23" aria-hidden="true" tabindex="-1"></a><span class="fu">pander</span>(<span class="fu">head</span>(iris))</span>
366 <span id="cb6-24"><a href="#cb6-24" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
367 <span id="cb6-25"><a href="#cb6-25" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span></span>
368 <span id="cb6-26"><a href="#cb6-26" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; +--------------+-------------+--------------+-------------+---------+</span></span>
369 <span id="cb6-27"><a href="#cb6-27" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; | Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species |</span></span>
370 <span id="cb6-28"><a href="#cb6-28" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; +==============+=============+==============+=============+=========+</span></span>
371 <span id="cb6-29"><a href="#cb6-29" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; | 5.1 | 3.5 | 1.4 | 0.2 | setosa |</span></span>
372 <span id="cb6-30"><a href="#cb6-30" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; +--------------+-------------+--------------+-------------+---------+</span></span>
373 <span id="cb6-31"><a href="#cb6-31" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; | 4.9 | 3 | 1.4 | 0.2 | setosa |</span></span>
374 <span id="cb6-32"><a href="#cb6-32" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; +--------------+-------------+--------------+-------------+---------+</span></span>
375 <span id="cb6-33"><a href="#cb6-33" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; | 4.7 | 3.2 | 1.3 | 0.2 | setosa |</span></span>
376 <span id="cb6-34"><a href="#cb6-34" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; +--------------+-------------+--------------+-------------+---------+</span></span>
377 <span id="cb6-35"><a href="#cb6-35" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; | 4.6 | 3.1 | 1.5 | 0.2 | setosa |</span></span>
378 <span id="cb6-36"><a href="#cb6-36" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; +--------------+-------------+--------------+-------------+---------+</span></span>
379 <span id="cb6-37"><a href="#cb6-37" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; | 5 | 3.6 | 1.4 | 0.2 | setosa |</span></span>
380 <span id="cb6-38"><a href="#cb6-38" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; +--------------+-------------+--------------+-------------+---------+</span></span>
381 <span id="cb6-39"><a href="#cb6-39" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; | 5.4 | 3.9 | 1.7 | 0.4 | setosa |</span></span>
382 <span id="cb6-40"><a href="#cb6-40" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; +--------------+-------------+--------------+-------------+---------+</span></span>
383 <span id="cb6-41"><a href="#cb6-41" aria-hidden="true" tabindex="-1"></a><span class="fu">panderOptions</span>(<span class="st">&quot;table.style&quot;</span>, pots)</span></code></pre></div>
384 </div>
385
386
387
388 <!-- code folding -->
389
390
391 <!-- dynamically load mathjax for compatibility with self-contained -->
392 <script>
393 (function () {
394 var script = document.createElement("script");
395 script.type = "text/javascript";
396 script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
397 document.getElementsByTagName("head")[0].appendChild(script);
398 })();
399 </script>
400
401 </body>
402 </html>