aboutsummaryrefslogtreecommitdiff
path: root/man/twa.Rd
blob: a3509cd8edc1316dc48e69dfda4217b6efbd1d37 (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
% 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{
\code{\link{max_twa}}
}

Contact - Imprint