aboutsummaryrefslogtreecommitdiff
path: root/man/sawtooth.Rd
blob: aba3428141e7ec1166defda765edd1339025e978 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/twa.R
\name{sawtooth}
\alias{sawtooth}
\title{Create decline time series for multiple applications}
\usage{
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}

\item{n}{The number of applications. If \code{applications} is specified, \code{n} is ignored}

\item{i}{The interval between applications. If \code{applications} is specified, \code{i}
is ignored}

\item{applications}{A data frame holding the application times in the first column and
the corresponding amounts applied in the second column.}
}
\description{
If the number of application cycles \code{n} is greater than 1, the
application pattern specified in \code{applications} is repeated \code{n}
times, with an interval \code{i}.
}
\examples{
applications = data.frame(time = seq(0, 14, by = 7), amount = c(1, 2, 3))
pred <- one_box(10)
plot(sawtooth(pred, applications = applications))

m_2 <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"))
fit_2 <- mkinfit(m_2, FOCUS_2006_D, quiet = TRUE)
pred_2 <- one_box(fit_2, ini = 1)
pred_2_saw <- sawtooth(pred_2, 2, 7)
plot(pred_2_saw, max_twa = 21, max_twa_var = "m1")

max_twa(pred_2_saw)
}

Contact - Imprint