<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>blog_philipppro</title>
<link>https://philipppro.quarto.pub/blog_philipppro/</link>
<atom:link href="https://philipppro.quarto.pub/blog_philipppro/index.xml" rel="self" type="application/rss+xml"/>
<description>A data science blog with focus on R</description>
<generator>quarto-1.8.25</generator>
<lastBuildDate>Tue, 27 Jan 2026 23:00:00 GMT</lastBuildDate>
<item>
  <title>Book Recommendations</title>
  <dc:creator>Philipp Probst</dc:creator>
  <link>https://philipppro.quarto.pub/blog_philipppro/posts/book-recommendations/book_recommendations.html</link>
  <description><![CDATA[ 





<!-- https://bookdown.org/yihui/rmarkdown/ -->
<p>There was a very long time without a blog post from me.</p>
<p>I will start now again with a very short blog post with some book and blog recommendations.</p>
<p>I think two still very hot topics currently are AI and Causal Modelling.</p>
<section id="ai" class="level3">
<h3 class="anchored" data-anchor-id="ai">AI</h3>
<p>For a theoretical AI introduction I can recommend the following script:</p>
<p><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5162304">AI Tools for Actuaries</a></p>
<p>There are of course some more practical books on how to implement and use AI. Here is a recommendation list:</p>
<p><a href="https://www.index.dev/blog/best-ai-books-engineering-leaders">Top 10 Must-Read Books on Artificial Intelligence (AI) in 2026</a></p>
<p>I want to go through some of these books in the future, but did not have time to get into them yet.</p>
</section>
<section id="causal-modelling" class="level3">
<h3 class="anchored" data-anchor-id="causal-modelling">Causal Modelling</h3>
<p>For Causal ML I can recommend the following online book:</p>
<p><a href="https://matheusfacure.github.io/python-causality-handbook/landing-page.html">Causal Inference for The Brave and True</a></p>


</section>

 ]]></description>
  <category>news</category>
  <guid>https://philipppro.quarto.pub/blog_philipppro/posts/book-recommendations/book_recommendations.html</guid>
  <pubDate>Tue, 27 Jan 2026 23:00:00 GMT</pubDate>
</item>
<item>
  <title>Automatising R-Markdown</title>
  <dc:creator>Philipp Probst</dc:creator>
  <link>https://philipppro.quarto.pub/blog_philipppro/posts/automatising-rmarkdown/automatising_rmarkdown.html</link>
  <description><![CDATA[ 





<!-- https://bookdown.org/yihui/rmarkdown/ -->
<p>In this blog post I will explain how you can automatise the creation of R-Markdown documents.</p>
<p>My main motivation for this was that I had a document where I had to create an R Markdown with several very similar sections. Of course I could write each section with new code, but I do not like repetive tasks (they are boring and tiring), so I decided to automatise the creation of sections, tables and graphs.</p>
<p>I do not want to run all the (quite long) data creation process when building the R-Markdown. So firstly I created a script to create the data and saved it with <strong>RDS</strong> format (I am also a big fan of <strong>fst</strong> format, but the data was in a nested list, which cannot be saved in <strong>fst</strong>-Format).</p>
<p>When creating the R-Markdown the data was ready to use.</p>
<p>The next step was to create the introduction of the document. I wanted to put all the creation of the outputs into functions.</p>
<section id="libraries-loading" class="level2">
<h2 class="anchored" data-anchor-id="libraries-loading">Libraries loading</h2>
<p>First thing is to load some of the necessary libraries</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(DT)</span>
<span id="cb1-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(data.table)</span>
<span id="cb1-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(knitr)</span>
<span id="cb1-4"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(ggplot2)</span>
<span id="cb1-5"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">suppressPackageStartupMessages</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(plotly))</span>
<span id="cb1-6">knitr<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span>opts_chunk<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">set</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">echo =</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>)</span></code></pre></div></div>
</div>
</section>
<section id="results-asis" class="level2">
<h2 class="anchored" data-anchor-id="results-asis">Results: asis</h2>
<p>So my way to go was to use the option <code>results = "asis"</code> in the setting of R-Markdown:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode md code-with-copy"><code class="sourceCode markdown"><span id="cb2-1"><span class="in" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">```{r asis_example, results = "asis"}</span></span>
<span id="cb2-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste0</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"- `"</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">names</span>(iris), <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"`"</span>), <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">sep =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb2-3"><span class="in" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">```</span></span></code></pre></div></div>
<p>This option tells knitr not to wrap your text output in verbatim code blocks, but treat it “as is.”</p>
<p><strong>Output:</strong></p>
<hr>
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb3-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste0</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"- "</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">names</span>(iris)), <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">sep =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span></code></pre></div></div>
<ul>
<li><p>Sepal.Length</p></li>
<li><p>Sepal.Width</p></li>
<li><p>Petal.Length</p></li>
<li><p>Petal.Width</p></li>
<li><p>Species</p></li>
</ul>
<hr>
<section id="usage-of-cat" class="level3">
<h3 class="anchored" data-anchor-id="usage-of-cat">Usage of cat</h3>
<p>It is important (and a bit laborious) to wrap outputs into <code>cat</code>, otherwise it is not treated correctly by R-Markdown. Moreover \n\n is used to start a new line. Here a bad example:</p>
<p><strong>Output:</strong></p>
<hr>
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb4-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">print</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste0</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"- "</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">names</span>(iris), <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>))</span></code></pre></div></div>
<p>[1] “- Sepal.Length” “- Sepal.Width” “- Petal.Length” [4] “- Petal.Width” “- Species”</p>
<hr>
</section>
<section id="usage-of-echo" class="level3">
<h3 class="anchored" data-anchor-id="usage-of-echo">Usage of echo</h3>
<p>It is important to set the option <code>echo = FALSE</code>, otherwise the input code is also printed out. Some introduction with header could look like this:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode md code-with-copy"><code class="sourceCode markdown"><span id="cb5-1"><span class="in" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">```{r intro, echo = FALSE, results = "asis"}</span></span>
<span id="cb5-2">      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"# General Information  {-}</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb5-3">      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"**Model creator:**</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb5-4">      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Philipp Probst"</span>)</span>
<span id="cb5-5">      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb5-6">      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"**Creation Date of Models:**</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb5-7">      knitr<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">knit_print</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">as.Date</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Sys.Date</span>()))</span>
<span id="cb5-8"><span class="in" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">```</span></span></code></pre></div></div>
<p><strong>Output:</strong></p>
<hr>
</section>
</section>
<section id="general-information" class="level1 unnumbered">
<h1 class="unnumbered">General Information</h1>
<p><strong>Model creator:</strong></p>
<p>Philipp Probst</p>
<p><strong>Creation Date of Models:</strong></p>
<p>[1] “2026-01-28”</p>
<hr>
<p>As you can see in the above code I used <code>r</code>knitr::knit_print` to have a proper output for the date. This will be necessary in many cases (e.g. also when printing tables or plots).</p>
<section id="tabs" class="level2">
<h2 class="anchored" data-anchor-id="tabs">Tabs</h2>
<p>Moreover to show things by using the space ideally and in a nice way is to use tabs.</p>
<p>For this we have to add <code>\{.tabset \}</code> behind the header. <code>\{.unnumbered \}</code> can be used to set off numbering of the header, if in general it is turned on (e.g.&nbsp;in the preamble: <code>number_sections: true</code>).</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="sourceCode md code-with-copy"><code class="sourceCode markdown"><span id="cb6-1"><span class="in" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">```{r tabs, echo = FALSE, results = "asis"}</span></span>
<span id="cb6-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"## My Tabs header {.tabset .unnumbered} </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb6-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste0</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"### "</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Tab 1"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" {.unnumbered} </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>))</span>
<span id="cb6-4"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ABC </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb6-5"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"### Tab 2  {-}</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb6-6"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"DEF </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb6-7"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"## New Section</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb6-8"><span class="in" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">```</span></span></code></pre></div></div>
<p><strong>Output:</strong></p>
<hr>
</section>
<section id="my-tabs-header" class="level2 tabset unnumbered">
<h2 class="tabset unnumbered anchored" data-anchor-id="my-tabs-header">My Tabs header</h2>
<section id="tab-1" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="tab-1">Tab 1</h3>
<p>ABC</p>
</section>
<section id="tab-2" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="tab-2">Tab 2</h3>
<p>DEF</p>
</section>
</section>
<section id="new-section" class="level2">
<h2 class="anchored" data-anchor-id="new-section">New Section</h2>
<hr>
</section>
<section id="folding" class="level2">
<h2 class="anchored" data-anchor-id="folding">Folding</h2>
<p>Another nice tool is that you can fold some section, text, graphs, etc.</p>
<p>For this you have to use the HTML <code>&lt;details&gt;</code> tag:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="sourceCode md code-with-copy"><code class="sourceCode markdown"><span id="cb7-1"><span class="in" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">```{r folds, echo = FALSE, results = "asis"}</span></span>
<span id="cb7-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Some text</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb7-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;details&gt;</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb7-4"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;summary&gt;Hidden Text&lt;/summary&gt;</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb7-5"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"DEF </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb7-6"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;/details&gt;</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb7-7"><span class="in" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">```</span></span></code></pre></div></div>
<p><strong>Output:</strong></p>
<hr>
<p>Some text</p>
<details>
<summary>
Hidden Text
</summary>
<p>DEF</p>
</details>
<hr>
</section>
<section id="printing-tables-and-plots" class="level2">
<h2 class="anchored" data-anchor-id="printing-tables-and-plots">Printing tables and plots</h2>
<section id="tables" class="level3">
<h3 class="anchored" data-anchor-id="tables">Tables</h3>
<p>For printing tables it is necessary to wrap the function <code>knitr::knit_print()</code> and <code>DT::datatable</code> around them. Then it has also nice sorting abilities.</p>
<p>It is also possible to print a table by using <code>print(kable(…))</code> although it does not have the nice abilities of <code>DT::datatable</code> .</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="sourceCode md code-with-copy"><code class="sourceCode markdown"><span id="cb8-1"><span class="in" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">```{r tables, echo = FALSE, results = "asis"}</span></span>
<span id="cb8-2">knitr<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">knit_print</span>(DT<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">datatable</span>(iris[<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">6</span>,]))</span>
<span id="cb8-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">print</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">kable</span>(iris[<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">6</span>,]))</span>
<span id="cb8-4"><span class="in" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">```</span></span></code></pre></div></div>
<p><strong>Output:</strong></p>
<hr>
<div class="datatables html-widget html-fill-item" id="htmlwidget-9752775dd25ce50d23e9" style="width:100%;height:auto;"></div>
<script type="application/json" data-for="htmlwidget-9752775dd25ce50d23e9">{"x":{"filter":"none","vertical":false,"data":[["1","2","3","4","5","6"],[5.1,4.9,4.7,4.6,5,5.4],[3.5,3,3.2,3.1,3.6,3.9],[1.4,1.4,1.3,1.5,1.4,1.7],[0.2,0.2,0.2,0.2,0.2,0.4],["setosa","setosa","setosa","setosa","setosa","setosa"]],"container":"<table class=\"display\">\n  <thead>\n    <tr>\n      <th> <\/th>\n      <th>Sepal.Length<\/th>\n      <th>Sepal.Width<\/th>\n      <th>Petal.Length<\/th>\n      <th>Petal.Width<\/th>\n      <th>Species<\/th>\n    <\/tr>\n  <\/thead>\n<\/table>","options":{"columnDefs":[{"className":"dt-right","targets":[1,2,3,4]},{"orderable":false,"targets":0},{"name":" ","targets":0},{"name":"Sepal.Length","targets":1},{"name":"Sepal.Width","targets":2},{"name":"Petal.Length","targets":3},{"name":"Petal.Width","targets":4},{"name":"Species","targets":5}],"order":[],"autoWidth":false,"orderClasses":false}},"evals":[],"jsHooks":[]}</script>
<table class="caption-top table">
<thead>
<tr class="header">
<th style="text-align: right;">Sepal.Length</th>
<th style="text-align: right;">Sepal.Width</th>
<th style="text-align: right;">Petal.Length</th>
<th style="text-align: right;">Petal.Width</th>
<th style="text-align: left;">Species</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: right;">5.1</td>
<td style="text-align: right;">3.5</td>
<td style="text-align: right;">1.4</td>
<td style="text-align: right;">0.2</td>
<td style="text-align: left;">setosa</td>
</tr>
<tr class="even">
<td style="text-align: right;">4.9</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">1.4</td>
<td style="text-align: right;">0.2</td>
<td style="text-align: left;">setosa</td>
</tr>
<tr class="odd">
<td style="text-align: right;">4.7</td>
<td style="text-align: right;">3.2</td>
<td style="text-align: right;">1.3</td>
<td style="text-align: right;">0.2</td>
<td style="text-align: left;">setosa</td>
</tr>
<tr class="even">
<td style="text-align: right;">4.6</td>
<td style="text-align: right;">3.1</td>
<td style="text-align: right;">1.5</td>
<td style="text-align: right;">0.2</td>
<td style="text-align: left;">setosa</td>
</tr>
<tr class="odd">
<td style="text-align: right;">5.0</td>
<td style="text-align: right;">3.6</td>
<td style="text-align: right;">1.4</td>
<td style="text-align: right;">0.2</td>
<td style="text-align: left;">setosa</td>
</tr>
<tr class="even">
<td style="text-align: right;">5.4</td>
<td style="text-align: right;">3.9</td>
<td style="text-align: right;">1.7</td>
<td style="text-align: right;">0.4</td>
<td style="text-align: left;">setosa</td>
</tr>
</tbody>
</table>
<hr>
</section>
<section id="plots" class="level3">
<h3 class="anchored" data-anchor-id="plots">Plots</h3>
<p>Base-R, ggplot2 or plotly plots do not need any adjustment in the <code>results = "asis"</code> mode.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="sourceCode md code-with-copy"><code class="sourceCode markdown"><span id="cb9-1"><span class="in" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">```{r plots, echo = FALSE, results = "asis"}</span></span>
<span id="cb9-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot</span>(iris<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Sepal.Length, iris<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Sepal.Width)</span>
<span id="cb9-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ggplot</span>(mpg, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">aes</span>(displ, hwy, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">colour =</span> class)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">geom_point</span>()</span>
<span id="cb9-4"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot_ly</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">data =</span> iris, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">x =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span>Sepal.Length, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">y =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span>Petal.Length)</span>
<span id="cb9-5"><span class="in" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">```</span></span></code></pre></div></div>
<p><strong>Output:</strong></p>
<hr>
<p><img src="https://philipppro.quarto.pub/blog_philipppro/posts/automatising-rmarkdown/automatising_rmarkdown_files/figure-html/plots-1.png" class="img-fluid" width="672"><img src="https://philipppro.quarto.pub/blog_philipppro/posts/automatising-rmarkdown/automatising_rmarkdown_files/figure-html/plots-2.png" class="img-fluid" width="672"></p>
<div class="plotly html-widget html-fill-item" id="htmlwidget-b16271a8dfc7aa365883" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-b16271a8dfc7aa365883">{"x":{"visdat":{"71286c4a3686":["function () ","plotlyVisDat"]},"cur_data":"71286c4a3686","attrs":{"71286c4a3686":{"x":{},"y":{},"alpha_stroke":1,"sizes":[10,100],"spans":[1,20]}},"layout":{"margin":{"b":40,"l":60,"t":25,"r":10},"xaxis":{"domain":[0,1],"automargin":true,"title":"Sepal.Length"},"yaxis":{"domain":[0,1],"automargin":true,"title":"Petal.Length"},"hovermode":"closest","showlegend":false},"source":"A","config":{"modeBarButtonsToAdd":["hoverclosest","hovercompare"],"showSendToCloud":false},"data":[{"x":[5.0999999999999996,4.9000000000000004,4.7000000000000002,4.5999999999999996,5,5.4000000000000004,4.5999999999999996,5,4.4000000000000004,4.9000000000000004,5.4000000000000004,4.7999999999999998,4.7999999999999998,4.2999999999999998,5.7999999999999998,5.7000000000000002,5.4000000000000004,5.0999999999999996,5.7000000000000002,5.0999999999999996,5.4000000000000004,5.0999999999999996,4.5999999999999996,5.0999999999999996,4.7999999999999998,5,5,5.2000000000000002,5.2000000000000002,4.7000000000000002,4.7999999999999998,5.4000000000000004,5.2000000000000002,5.5,4.9000000000000004,5,5.5,4.9000000000000004,4.4000000000000004,5.0999999999999996,5,4.5,4.4000000000000004,5,5.0999999999999996,4.7999999999999998,5.0999999999999996,4.5999999999999996,5.2999999999999998,5,7,6.4000000000000004,6.9000000000000004,5.5,6.5,5.7000000000000002,6.2999999999999998,4.9000000000000004,6.5999999999999996,5.2000000000000002,5,5.9000000000000004,6,6.0999999999999996,5.5999999999999996,6.7000000000000002,5.5999999999999996,5.7999999999999998,6.2000000000000002,5.5999999999999996,5.9000000000000004,6.0999999999999996,6.2999999999999998,6.0999999999999996,6.4000000000000004,6.5999999999999996,6.7999999999999998,6.7000000000000002,6,5.7000000000000002,5.5,5.5,5.7999999999999998,6,5.4000000000000004,6,6.7000000000000002,6.2999999999999998,5.5999999999999996,5.5,5.5,6.0999999999999996,5.7999999999999998,5,5.5999999999999996,5.7000000000000002,5.7000000000000002,6.2000000000000002,5.0999999999999996,5.7000000000000002,6.2999999999999998,5.7999999999999998,7.0999999999999996,6.2999999999999998,6.5,7.5999999999999996,4.9000000000000004,7.2999999999999998,6.7000000000000002,7.2000000000000002,6.5,6.4000000000000004,6.7999999999999998,5.7000000000000002,5.7999999999999998,6.4000000000000004,6.5,7.7000000000000002,7.7000000000000002,6,6.9000000000000004,5.5999999999999996,7.7000000000000002,6.2999999999999998,6.7000000000000002,7.2000000000000002,6.2000000000000002,6.0999999999999996,6.4000000000000004,7.2000000000000002,7.4000000000000004,7.9000000000000004,6.4000000000000004,6.2999999999999998,6.0999999999999996,7.7000000000000002,6.2999999999999998,6.4000000000000004,6,6.9000000000000004,6.7000000000000002,6.9000000000000004,5.7999999999999998,6.7999999999999998,6.7000000000000002,6.7000000000000002,6.2999999999999998,6.5,6.2000000000000002,5.9000000000000004],"y":[1.3999999999999999,1.3999999999999999,1.3,1.5,1.3999999999999999,1.7,1.3999999999999999,1.5,1.3999999999999999,1.5,1.5,1.6000000000000001,1.3999999999999999,1.1000000000000001,1.2,1.5,1.3,1.3999999999999999,1.7,1.5,1.7,1.5,1,1.7,1.8999999999999999,1.6000000000000001,1.6000000000000001,1.5,1.3999999999999999,1.6000000000000001,1.6000000000000001,1.5,1.5,1.3999999999999999,1.5,1.2,1.3,1.3999999999999999,1.3,1.5,1.3,1.3,1.3,1.6000000000000001,1.8999999999999999,1.3999999999999999,1.6000000000000001,1.3999999999999999,1.5,1.3999999999999999,4.7000000000000002,4.5,4.9000000000000004,4,4.5999999999999996,4.5,4.7000000000000002,3.2999999999999998,4.5999999999999996,3.8999999999999999,3.5,4.2000000000000002,4,4.7000000000000002,3.6000000000000001,4.4000000000000004,4.5,4.0999999999999996,4.5,3.8999999999999999,4.7999999999999998,4,4.9000000000000004,4.7000000000000002,4.2999999999999998,4.4000000000000004,4.7999999999999998,5,4.5,3.5,3.7999999999999998,3.7000000000000002,3.8999999999999999,5.0999999999999996,4.5,4.5,4.7000000000000002,4.4000000000000004,4.0999999999999996,4,4.4000000000000004,4.5999999999999996,4,3.2999999999999998,4.2000000000000002,4.2000000000000002,4.2000000000000002,4.2999999999999998,3,4.0999999999999996,6,5.0999999999999996,5.9000000000000004,5.5999999999999996,5.7999999999999998,6.5999999999999996,4.5,6.2999999999999998,5.7999999999999998,6.0999999999999996,5.0999999999999996,5.2999999999999998,5.5,5,5.0999999999999996,5.2999999999999998,5.5,6.7000000000000002,6.9000000000000004,5,5.7000000000000002,4.9000000000000004,6.7000000000000002,4.9000000000000004,5.7000000000000002,6,4.7999999999999998,4.9000000000000004,5.5999999999999996,5.7999999999999998,6.0999999999999996,6.4000000000000004,5.5999999999999996,5.0999999999999996,5.5999999999999996,6.0999999999999996,5.5999999999999996,5.5,4.7999999999999998,5.4000000000000004,5.5999999999999996,5.0999999999999996,5.0999999999999996,5.9000000000000004,5.7000000000000002,5.2000000000000002,5,5.2000000000000002,5.4000000000000004,5.0999999999999996],"type":"scatter","mode":"markers","marker":{"color":"rgba(31,119,180,1)","line":{"color":"rgba(31,119,180,1)"}},"error_y":{"color":"rgba(31,119,180,1)"},"error_x":{"color":"rgba(31,119,180,1)"},"line":{"color":"rgba(31,119,180,1)"},"xaxis":"x","yaxis":"y","frame":null}],"highlight":{"on":"plotly_click","persistent":false,"dynamic":false,"selectize":false,"opacityDim":0.20000000000000001,"selected":{"opacity":1},"debounce":0},"shinyEvents":["plotly_hover","plotly_click","plotly_selected","plotly_relayout","plotly_brushed","plotly_brushing","plotly_clickannotation","plotly_doubleclick","plotly_deselect","plotly_afterplot","plotly_sunburstclick"],"base_url":"https://plot.ly"},"evals":[],"jsHooks":[]}</script>
<hr>
<p>I will add more tricks in the next blog post.</p>
<p>E.g. it will include the following</p>
<ul>
<li>Functions that automatically create tabs</li>
<li>How to chunkify</li>
</ul>


</section>
</section>
</section>

 ]]></description>
  <category>news</category>
  <category>code</category>
  <category>analysis</category>
  <category>R</category>
  <guid>https://philipppro.quarto.pub/blog_philipppro/posts/automatising-rmarkdown/automatising_rmarkdown.html</guid>
  <pubDate>Fri, 01 Dec 2023 23:00:00 GMT</pubDate>
</item>
<item>
  <title>Welcome To My Blog</title>
  <dc:creator>Philipp Probst</dc:creator>
  <link>https://philipppro.quarto.pub/blog_philipppro/posts/welcome/</link>
  <description><![CDATA[ 





<p>This is the first post in my new Quarto blog. Welcome!</p>
<p>I followed this instruction to create my new Quarto blog: <a href="https://quarto.org/docs/websites/website-blog.html" class="uri">https://quarto.org/docs/websites/website-blog.html</a></p>
<p>Quarto is much more flexible and plays very well with R-Markdown documents. That’s why I decided to migrate from my <a href="http://philipppro.github.io/about/">old blog</a>.</p>
<p>My old will not get any updates anymore and I will probably migrate some of the content from there.</p>
<p><img src="https://philipppro.quarto.pub/blog_philipppro/posts/welcome/image.jpg" class="img-fluid"></p>



 ]]></description>
  <category>news</category>
  <category>R</category>
  <guid>https://philipppro.quarto.pub/blog_philipppro/posts/welcome/</guid>
  <pubDate>Thu, 30 Nov 2023 23:00:00 GMT</pubDate>
  <media:content url="https://philipppro.quarto.pub/blog_philipppro/posts/welcome/image.jpg" medium="image" type="image/jpeg"/>
</item>
</channel>
</rss>
