resolved merge conflict with master
parent
24b41eb975
commit
abee486c28
|
@ -18,14 +18,8 @@ _**Function type:** Aggregate_
|
|||
|
||||
```js
|
||||
movingAverage(
|
||||
<<<<<<< HEAD
|
||||
n: 5,
|
||||
columns: ["_value"]
|
||||
=======
|
||||
every: 1d,
|
||||
period: 5d,
|
||||
column="_value"
|
||||
>>>>>>> master
|
||||
)
|
||||
```
|
||||
|
||||
|
@ -38,7 +32,6 @@ movingAverage(
|
|||
|
||||
## Parameters
|
||||
|
||||
<<<<<<< HEAD
|
||||
### n
|
||||
The number of points to average.
|
||||
|
||||
|
@ -49,8 +42,6 @@ Columns to operate on. _Defaults to `["_value"]`_.
|
|||
|
||||
_**Data type:** Array of Strings_
|
||||
|
||||
=======
|
||||
>>>>>>> master
|
||||
## Examples
|
||||
|
||||
#### Calculate a five point moving average
|
||||
|
@ -62,18 +53,12 @@ from(bucket: "example-bucket"):
|
|||
|
||||
#### Calculate a ten point moving average
|
||||
```js
|
||||
<<<<<<< HEAD
|
||||
from(bucket: "example-bucket"):
|
||||
|> range(start: -12h)
|
||||
|> movingAverage(n: 10)
|
||||
=======
|
||||
movingAverage = (every, period, column="_value", tables=<-) =>
|
||||
tables
|
||||
|> window(every: every, period: period)
|
||||
|> mean(column: column)
|
||||
|> duplicate(column: "_stop", as: "_time")
|
||||
|> window(every: inf)
|
||||
>>>>>>> master
|
||||
```
|
||||
|
||||
#### Table transformation with a two point moving average
|
||||
|
|
Loading…
Reference in New Issue