Description Usage Arguments Value Note See Also Examples

This function finds all peaks (local maxima) in a spectrum, using a user
provided size threshold relative to the tallest peak (global maximum) bellow
which found peaks are ignored—i.e., not included in the returned value. This
is a wrapper built on top of function `peaks()`

from package 'splus2R'.

1 | ```
find_peaks(x, ignore_threshold = 0, span = 3, strict = TRUE, na.rm = FALSE)
``` |

`x` |
numeric vector |

`ignore_threshold` |
numeric Value between 0.0 and 1.0 indicating the relative size compared to tallest peak threshold below which peaks will be ignored. Negative values set a threshold so that the tallest peaks are ignored, instead of the shortest. |

`span` |
integer A peak is defined as an element in a sequence which is
greater than all other elements within a window of width |

`strict` |
logical If |

`na.rm` |
logical indicating whether |

A logical vector of the same length as `x`

. Values that are
`TRUE`

correspond to local peaks in the data.

This function is a wrapper built on function
`peaks`

from splus2R and handles non-finite
(including `NA`

) values differently than `splus2R::peaks`

,
instead of giving an error they are replaced with the smallest finite value
in `x`

.

Other peaks and valleys functions:
`find_spikes()`

,
`get_peaks()`

,
`peaks()`

,
`replace_bad_pixs()`

,
`spikes()`

,
`valleys()`

,
`wls_at_target()`

1 |

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.