aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--R/twa.R2
-rw-r--r--docs/reference/PELMO_runs.html2
-rw-r--r--docs/reference/plot.one_box-4.pngbin10742 -> 10688 bytes
-rw-r--r--docs/reference/plot.one_box-8.pngbin13953 -> 12575 bytes
-rw-r--r--docs/reference/sawtooth-6.pngbin13953 -> 12575 bytes
-rw-r--r--docs/reference/sawtooth.html10
-rw-r--r--man/sawtooth.Rd4
7 files changed, 9 insertions, 9 deletions
diff --git a/R/twa.R b/R/twa.R
index 0cece29..ace7656 100644
--- a/R/twa.R
+++ b/R/twa.R
@@ -195,7 +195,7 @@ plot.one_box <- function(x,
#'
#' max_twa(pred_2_saw)
sawtooth <- function(x, n = 1, i = 365,
- applications = data.frame(time = seq(0, 0 + n * i, length.out = n),
+ applications = data.frame(time = seq(0, (n - 1) * i, length.out = n),
amount = 1))
{
n_obs = ncol(as.matrix(x))
diff --git a/docs/reference/PELMO_runs.html b/docs/reference/PELMO_runs.html
index 3b64c6e..25afcf0 100644
--- a/docs/reference/PELMO_runs.html
+++ b/docs/reference/PELMO_runs.html
@@ -190,7 +190,7 @@ the period.plm file generated by the FOCUS PELMO GUI.</p>
#&gt;
#&gt; </div><div class='input'><span class='co'># We get exactly the same PECgw values (on Linux, calling PELMO using Wine).</span>
<span class='fu'>print</span>(<span class='no'>time_1</span>)</div><div class='output co'>#&gt; User System verstrichen
-#&gt; 219.860 0.960 55.449 </div><div class='input'>
+#&gt; 218.736 0.940 54.948 </div><div class='input'>
<span class='co'># Demonstrate some results with metabolites.</span>
<span class='no'>runs_2</span> <span class='kw'>&lt;-</span> <span class='fu'>list</span>(<span class='fu'>list</span>(<span class='kw'>psm</span> <span class='kw'>=</span> <span class='st'>'Pesticide_D_1_May_every_other_year_mets'</span>,
<span class='kw'>win</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"Cha"</span>, <span class='st'>"Ham"</span>, <span class='st'>"Kre"</span>)))
diff --git a/docs/reference/plot.one_box-4.png b/docs/reference/plot.one_box-4.png
index 1a1a7c6..06b2cde 100644
--- a/docs/reference/plot.one_box-4.png
+++ b/docs/reference/plot.one_box-4.png
Binary files differ
diff --git a/docs/reference/plot.one_box-8.png b/docs/reference/plot.one_box-8.png
index aa74981..3ff6e8a 100644
--- a/docs/reference/plot.one_box-8.png
+++ b/docs/reference/plot.one_box-8.png
Binary files differ
diff --git a/docs/reference/sawtooth-6.png b/docs/reference/sawtooth-6.png
index aa74981..3ff6e8a 100644
--- a/docs/reference/sawtooth-6.png
+++ b/docs/reference/sawtooth-6.png
Binary files differ
diff --git a/docs/reference/sawtooth.html b/docs/reference/sawtooth.html
index 0d5c9a9..ce528e6 100644
--- a/docs/reference/sawtooth.html
+++ b/docs/reference/sawtooth.html
@@ -77,8 +77,8 @@ application pattern specified in <code>applications</code> is repeated <code>n</
times, with an interval <code>i</code>.</p>
- <pre class="usage"><span class='fu'>sawtooth</span>(<span class='no'>x</span>, <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>i</span> <span class='kw'>=</span> <span class='fl'>365</span>, <span class='kw'>applications</span> <span class='kw'>=</span> <span class='fu'>data.frame</span>(<span class='kw'>time</span> <span class='kw'>=</span> <span class='fu'>seq</span>(<span class='fl'>0</span>, <span class='fl'>0</span> + <span class='no'>n</span>
- * <span class='no'>i</span>, <span class='kw'>length.out</span> <span class='kw'>=</span> <span class='no'>n</span>), <span class='kw'>amount</span> <span class='kw'>=</span> <span class='fl'>1</span>))</pre>
+ <pre class="usage"><span class='fu'>sawtooth</span>(<span class='no'>x</span>, <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>i</span> <span class='kw'>=</span> <span class='fl'>365</span>, <span class='kw'>applications</span> <span class='kw'>=</span> <span class='fu'>data.frame</span>(<span class='kw'>time</span> <span class='kw'>=</span> <span class='fu'>seq</span>(<span class='fl'>0</span>, (<span class='no'>n</span> -
+ <span class='fl'>1</span>) * <span class='no'>i</span>, <span class='kw'>length.out</span> <span class='kw'>=</span> <span class='no'>n</span>), <span class='kw'>amount</span> <span class='kw'>=</span> <span class='fl'>1</span>))</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
@@ -114,15 +114,15 @@ the corresponding amounts applied in the second column.</p></td>
<span class='fu'>plot</span>(<span class='no'>pred_2_saw</span>, <span class='kw'>max_twa</span> <span class='kw'>=</span> <span class='fl'>21</span>, <span class='kw'>max_twa_var</span> <span class='kw'>=</span> <span class='st'>"m1"</span>)</div><img src='sawtooth-6.png' alt='' width='540' height='400' /><div class='input'>
<span class='fu'><a href='max_twa.html'>max_twa</a></span>(<span class='no'>pred_2_saw</span>)</div><div class='output co'>#&gt; $max
#&gt; parent m1
-#&gt; 0.6627707 0.8542785
+#&gt; 0.7834480 0.8617048
#&gt;
#&gt; $window_start
#&gt; parent m1
-#&gt; 0.00 32.09
+#&gt; 0.00 26.85
#&gt;
#&gt; $window_end
#&gt; parent m1
-#&gt; 21.00 53.09
+#&gt; 21.00 47.85
#&gt; </div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
diff --git a/man/sawtooth.Rd b/man/sawtooth.Rd
index 3b1bd3e..aba3428 100644
--- a/man/sawtooth.Rd
+++ b/man/sawtooth.Rd
@@ -4,8 +4,8 @@
\alias{sawtooth}
\title{Create decline time series for multiple applications}
\usage{
-sawtooth(x, n = 1, i = 365, applications = data.frame(time = seq(0, 0 + n
- * i, length.out = n), amount = 1))
+sawtooth(x, n = 1, i = 365, applications = data.frame(time = seq(0, (n -
+ 1) * i, length.out = n), amount = 1))
}
\arguments{
\item{x}{A \code{\link{one_box}} object}

Contact - Imprint