| peak_ratio | R Documentation |
Calculates the ratio between intensities at numerator and denominator
wavenumbers for every spectrum in an OpenSpecy object.
peak_ratio(x, ...)
## Default S3 method:
peak_ratio(x, ...)
## S3 method for class 'OpenSpecy'
peak_ratio(x, numerator, denominator, method = c("nearest", "linear"), ...)
x |
an |
numerator |
a finite numeric scalar giving the numerator wavenumber. |
denominator |
a finite numeric scalar giving the denominator wavenumber. |
method |
character; use |
... |
additional arguments passed to methods. |
This function evaluates intensities at two user-supplied points; it does not
search for local maxima. With method = "nearest", a point exactly
halfway between two measured wavenumbers uses the lower wavenumber. Linear
interpolation is confined to the two adjacent measured points and never
extrapolates beyond the shared wavenumber axis.
For an area-over-area ratio, calculate the numerator and denominator from
explicit ranges with area_under_band() and divide the two
returned vectors. Named area-under-band indices remain available through
that function's index argument.
A named numeric vector with one ratio per spectrum. Names and order match
the columns of x$spectra. Ratios with a zero denominator or a
non-finite numerator, denominator, or result are returned as NA.
point_intensity() for a non-ratio measurement at one
wavenumber and area_under_band() for individual band areas
and named area-over-area indices.
data("raman_hdpe")
peak_ratio(raman_hdpe, numerator = 2880, denominator = 2840)
peak_ratio(raman_hdpe, numerator = 2880, denominator = 2840,
method = "linear")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.