Description Usage Arguments Value Note See Also Examples

Finds the local maxima in a vector, or time series, or in each column of a matrix.

1 |

`x` |
vector or matrix. |

`span` |
a peak is defined as an element in a sequence which is greater than all other elements within a window of width span centered at that element. The default value is 3, meaning that a peak is bigger than both of its neighbors. Default: 3. |

`strict` |
logical flag: if TRUE, an element must be strictly greater than all other values in its window to be considered a peak. Default: TRUE. |

`endbehavior` |
a value of 0, 1 or 2 that determines how peaks are computed within
a |

an object like `x`

of logical values.
Values that are TRUE correspond to local peaks in the data.

The value of `endbehavior`

acts as follows:
0 is as if the series had runs of `halfwidth`

values of `Inf`

attached to either end,
1 is as if there were runs of `halfwidth`

values of `-Inf`

attached,
and 2 is as if there were runs of`halfwidth`

values of `NA`

attached.

1 2 3 4 |

```
```

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.