Error(s) in re-building vignettes:
--- re-building ‘get_nltt_values.Rmd’ using rmarkdown
Pandoc is required to build R Markdown vignettes but not available. Please make sure it is installed.
Warning in file.info(x, extra_cols = FALSE) :
  expanded path length 22901 would be too long for
<p>Calculating the average nLTT plot of multiple phylogenies
is not a trivial tasks.</p>
<p>The function <code>get_nltt_values</code>
collects the nLTT values of a collection of
phylogenies as tidy data.</p>
<p>This allows for a good interplay with ggplot2.</p>
<h3 id="example-easy-trees">Example: Easy trees</h3>
<p>Create two easy trees:</p>
<pre><code class="language-r">newick1 &lt;- &quot;((A:1,B:1):2,C:3);&quot;
newick2 &lt;- &quot;((A:2,B:2):1,C:3);&quot;
phylogeny1 &lt;- ape::read.tree(text = newick1)
phylogeny2 &lt;- ape::read.tree(text = newick2)
phylogenies &lt;- c(phylogeny1, phylogeny2)
</code></pre>
<p>There are very similar. <code>phylogeny1</code> has short tips:</p>
<pre><code class="language-r">ape::plot.phylo(phylogeny1)
ape::add.scale.bar() #nolint
</code></pre>
<p><img src="figure/unnamed-chunk-3-1.png" alt="plot of chunk unnamed-chunk-3" /></p>
<p>This can be observed in the nLTT plot:</p>
<pre><code class="language-r [... truncated]
--- finished re-building ‘get_nltt_values.Rmd’

--- re-building ‘nltt_diff.Rmd’ using rmarkdown
Pandoc is required to build R Markdown vignettes but not available. Please make sure it is installed.
Warning in file.info(x, extra_cols = FALSE) :
  expanded path length 6750 would be too long for
<h1 id="close-to-polytomies-easier-to-eyeball">Close to polytomies, easier to eyeball</h1>
<p>In ASCII art, I show two simple LTT plots:</p>
<pre><code class="language-r"># normalized number of lineages
#
# 1.0 +   X---X                                            #nolint
#     |   |
# 0.5 X---+                                                #nolint
#     |
#     +---+---+
#        0.5 1.0   normalized time
#
#
#
# normalized number of lineages
#
##  1.0  +       X                                         #nolint
##  0.75 |   X---+
##  0.5  |   |
##  0.25 X---+
##       +---+---+
##         0.5 1.0   normalized time
</code></pre>
<p>The nLTT statistic (simply the difference between the two) will be around 0.25.</p>
<p>This vignette shows how to measure this, from:</p>
<ul>
<li>two phylogenies</li>
<li>two LTT plots</li>
<li>two nLTT plots</li>
</ul>
<h2 id="two-pylogenies">Two pylogenies</h2>
<p>The two phylogenies</p>
<pre><code>#
#        [... truncated]
--- finished re-building ‘nltt_diff.Rmd’

--- re-building ‘nltts_plot.Rmd’ using rmarkdown
Pandoc is required to build R Markdown vignettes but not available. Please make sure it is installed.
Warning in file.info(x, extra_cols = FALSE) :
  expanded path length 3670 would be too long for
<p>The <code>nLTT</code> package facilitates plotting one or more nLTT plots,
using <code>nllt_plot</code> and <code>nllt_lines</code>.</p>
<p>These functions, however, do not show the average nLTT plot.</p>
<p>The function <code>nltts_plot</code> plots multiple nLTT plots and shows
the average nLTT. This helps in getting a quick visualization
of your data.</p>
<p>For working with the raw values, <code>get_nltt_values</code> is
preferably used.</p>
<h3 id="example-easy-trees">Example: Easy trees</h3>
<p>Create two easy trees:</p>
<pre><code class="language-r">newick1 &lt;- &quot;((A:1,B:1):2,C:3);&quot;
newick2 &lt;- &quot;((A:2,B:2):1,C:3);&quot;
phylogeny1 &lt;- ape::read.tree(text = newick1)
phylogeny2 &lt;- ape::read.tree(text = newick2)
</code></pre>
<p>There are very similar. <code>phylogeny1</code> has short tips:</p>
<pre><code class="language-r">ape::plot.phylo(phylogeny1)
ape::add.scale.bar() #nolint
</code></pre>
<p><img src="f [... truncated]
--- finished re-building ‘nltts_plot.Rmd’

--- re-building ‘stretch_nltt_matrix.Rmd’ using rmarkdown
Pandoc is required to build R Markdown vignettes but not available. Please make sure it is installed.
Warning in file.info(x, extra_cols = FALSE) :
  expanded path length 6465 would be too long for
<p>An nLTT plot consists out of points that denote a number of (normalized)
lineages in (normalized) time. For nLTT plots with only a few points,
<code>stretch_nltt_matrix</code> inserts timepoints.</p>
<h2 id="examples">Examples</h2>
<p>For all examples, the following R code must be run:</p>
<pre><code class="language-r">library(ape)
library(nLTT) # nolint
library(testit)
</code></pre>
<h3 id="example-easy-tree">Example: Easy tree</h3>
<p>Create an easy tree:</p>
<pre><code class="language-r">newick &lt;- &quot;((A:1,B:1):1,C:2);&quot;
phylogeny &lt;- ape::read.tree(text = newick)
plot(phylogeny)
ape::add.scale.bar() #nolint
</code></pre>
<p><img src="figure/unnamed-chunk-2-1.png" alt="plot of chunk unnamed-chunk-2" /></p>
<p>From this tree, we can create an nLTT plot:</p>
<pre><code class="language-r">nltt_plot(phylogeny)
</code></pre>
<p><img src="figure/unnamed-chunk-3-1.png" alt="plot of chunk unnamed-chunk-3" /></p>
<p>We can extrac [... truncated]
--- finished re-building ‘stretch_nltt_matrix.Rmd’

--- re-building ‘trees_with_root_edge.Rmd’ using rmarkdown
Pandoc is required to build R Markdown vignettes but not available. Please make sure it is installed.
Error: processing vignette 'trees_with_root_edge.Rmd' failed with diagnostics:
(converted from warning) expanded path length 2367 would be too long for
<p>This document intends to display a feature of the nLTT package:
if a stem is added to a phylogeny, the begin of that stem
is set as the most recent common ancestor.</p>
<p>Here I create a random phylogeny:</p>
<pre><code class="language-r">set.seed(42)
tree1 &lt;- ape::rcoal(2)
tree1$edge.length &lt;- tree1$edge.length / tree1$edge.length[1] # nolint ape variable name
</code></pre>
<p>I copy that same phylogeny and add a stem:</p>
<pre><code class="language-r">tree2 &lt;- tree1
tree2$root.edge &lt;- 1 # nolint ape variable name
</code></pre>
<p>Here is how the stemless phylogeny looks like:</p>
<pre><code class="language-r">ape::plot.phylo(tree1, root.edge = TRUE)
ape::add.scale.bar() #nolint
</code></pre>
<p><img src="figure/unnamed-chunk-4-1.png" alt="plot of chunk unnamed-chunk-4" /></p>
<p>I set <code>root.edge</code> to <code>TRUE</code>, just show it is absent.</p>
<p>Here is how the phylogeny with stem looks like:</p>
<pre><code [... truncated]
--- failed re-building ‘trees_with_root_edge.Rmd’

--- re-building ‘walkthrough.Rmd’ using rmarkdown
Pandoc is required to build R Markdown vignettes but not available. Please make sure it is installed.
Warning in file.info(x, extra_cols = FALSE) :
  expanded path length 3701 would be too long for
<h2 id="nltt-statistic-amp-nltt-plot">nLTT statistic &amp; nLTT plot</h2>
<p>In order to provide some worked examples, we first generate two random phylogenetic trees, with similar parameter settings. We simulate one tree with lambda = 0.4, and one tree with lambda = 0.25, both with 100 tips.</p>
<pre><code class="language-r">    library(nLTT) #nolint
    set.seed(42)
    tree1 &lt;- ape::rphylo(n = 100, birth = 0.4, death = 0.0)
    tree2 &lt;- ape::rphylo(n = 100, birth = 0.25, death = 0.0)
    par(mfrow = c(1, 2))
    par(mar = c(2, 2, 2, 2))
    plot(tree1)
    plot(tree2)
</code></pre>
<p><img src="figure/unnamed-chunk-1-1.png" alt="plot of chunk unnamed-chunk-1" /></p>
<p>The two trees look similar, but are not identical in shape.</p>
<p>This becomes even more obvious when we plot their normalized Lineage Through Time plots:</p>
<pre><code class="language-r">    nltt_plot(tree1, col = &quot;red&quot;)
    nltt_lines(tree2, col = &qu [... truncated]
--- finished re-building ‘walkthrough.Rmd’

SUMMARY: processing the following file failed:
  ‘trees_with_root_edge.Rmd’

Error: Vignette re-building failed.
Execution halted