From e6f968cf97ed6ca9268e6098d86ba63ff2c6d2b0 Mon Sep 17 00:00:00 2001
From: Johannes Ranke
Date: Wed, 24 May 2017 16:07:35 +0200
Subject: Fix for the sawtooth function for repeated applications
For n > 2, the second application was made at 2 * i instead of i.
---
docs/reference/sawtooth.html | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
(limited to 'docs/reference/sawtooth.html')
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 applications
is repeated n
times, with an interval i
.
- 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
@@ -114,15 +114,15 @@ the corresponding amounts applied in the second column.
plot(pred_2_saw, max_twa = 21, max_twa_var = "m1")
#> $max
#> parent m1
-#> 0.6627707 0.8542785
+#> 0.7834480 0.8617048
#>
#> $window_start
#> parent m1
-#> 0.00 32.09
+#> 0.00 26.85
#>
#> $window_end
#> parent m1
-#> 21.00 53.09
+#> 21.00 47.85
#>