aboutsummaryrefslogtreecommitdiff
path: root/man/twa.Rd
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2017-01-18 19:58:13 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2017-01-18 19:58:13 +0100
commita1d9f93138c2cfed92a683e37e72c737d52b7ad7 (patch)
treeb05e26c2c35f62145ad86a34ce43b9aeb9faef91 /man/twa.Rd
parent7900d5aa3b9e3036d0fd983a5611f71d3f3f64b2 (diff)
One box time series and twa values
- one_box() creates decline time series from mkinfit objects or simply from a half-life - sawtooth() generates sawtooth curves for arbitrary application patterns and decline models - twa() calculates moving window averages - max_twa() gives their maxima and - plot.one_box() can plot series generated by one_box() or sawtooth(), optionally adding a greay rectangle to illustrate the maximum moving window time weighted average
Diffstat (limited to 'man/twa.Rd')
-rw-r--r--man/twa.Rd29
1 files changed, 29 insertions, 0 deletions
diff --git a/man/twa.Rd b/man/twa.Rd
new file mode 100644
index 0000000..a6afa87
--- /dev/null
+++ b/man/twa.Rd
@@ -0,0 +1,29 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/twa.R
+\name{twa}
+\alias{twa}
+\alias{twa.one_box}
+\title{Calculate a time weighted average concentration}
+\usage{
+twa(x, window = 21)
+
+\method{twa}{one_box}(x, window = 21)
+}
+\arguments{
+\item{x}{An object of type \code{\link{one_box}}}
+
+\item{window}{The size of the moving window}
+}
+\description{
+The moving average is built only using the values in the past, so
+the earliest possible time for the maximum in the time series returned
+is after one window has passed.
+}
+\examples{
+pred <- sawtooth(one_box(10),
+ applications = data.frame(time = c(0, 7), amount = c(1, 1)))
+max_twa(pred)
+}
+\seealso{
+max_twa
+}

Contact - Imprint