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