Finds peaks in a time series by using a sliding window. Wrapper around find_local_maxima().

1 | ```
find_troughs(x, npoints = 3)
``` |

`x` |
The vector of numbers for which to identify peaks |

`npoints` |
The number of points to either side of the local maxima. Author: user 'stas g' on stackexchange at https://stats.stackexchange.com/questions/22974/how-to-find-local-peaks-valleys-in-a-series-of-data |

kahaaga/tstools documentation built on Nov. 30, 2017, 7:24 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.