Learn R Programming

photobiology (version 0.9.8)

clip_wl: Clip head and/or tail of a spectrum

Description

Clipping of head and tail of a spectrum based on wavelength limits, no interpolation used.

Usage

clip_wl(x, range, ...)
"clip_wl"(x, range, ...)
"clip_wl"(x, range = NULL, ...)
"clip_wl"(x, range = NULL, ...)
"clip_wl"(x, range = NULL, ...)
"clip_wl"(x, range = NULL, ...)

Arguments

x
an R object
range
a numeric vector of length two, or any other object for which function range() will return range of walengths expressed in nanometres.
...
not used

Value

an R object of same class as input, most frequently of a shorter length, and never longer.

Methods (by class)

  • default: Default for generic function
  • generic_spct: Clip an object of class "generic_spct" or derived.
  • generic_mspct: Clip an object of class "generic_mspct" or derived.
  • waveband: Clip an object of class "waveband".
  • list: Clip a list (of objects of class "waveband").

See Also

Other trim functions: trim_spct, trim_tails, trim_waveband, trim_wl

Examples

Run this code
clip_wl(sun.spct, range = c(400, 500))
clip_wl(sun.spct, range = c(NA, 500))
clip_wl(sun.spct, range = c(400, NA))

Run the code above in your browser using DataLab