Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

v_replace_hinges

Overwrite spectral data values at existing wavelength values.


Description

Overwriting spectral data with interpolated values at wavelengths values containing bad data is needed when cleaning spectral data. This function differs from insert_hinges() in that it returns a vector of y values instead of a tibble.

Usage

v_replace_hinges(x, y, h)

Arguments

x

numeric vector (sorted in increasing order).

y

numeric vector.

h

a numeric vector giving the wavelengths at which the y values should be replaced by interpolation, no interpolation is indicated by an empty numeric vector (numeric(0)).

Value

A numeric vector with the numeric values of y with values at the hinges replaced by interpolation of neighbours.

See Also


photobiology

Photobiological Calculations

v0.10.10
GPL (>= 2)
Authors
Pedro J. Aphalo [aut, cre] (<https://orcid.org/0000-0003-3385-972X>), Titta K. Kotilainen [ctb] (<https://orcid.org/0000-0002-2822-9734>), Glenn Davis [ctb], Agnese Fazio [ctb]
Initial release
2022-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.